'''simple docstring'''

def      UpperCamelCase_						(					snake_case_       :       Tuple						,		snake_case_       :       Tuple      )					->     Any:






 '''simple docstring'''

 __lowerCAmelCase											=						""""""
 for i in table:
  res += inp[i - 1]
 return res







def      UpperCamelCase_						(					snake_case_       :       Optional[int]      )					->     Dict:






 '''simple docstring'''

 return data[1:] + data[0]







def      UpperCamelCase_						(					snake_case_       :       Dict						,		snake_case_       :       Union[str, Any]      )					->     Dict:






 '''simple docstring'''

 __lowerCAmelCase											=						""""""
 for i in range(len(snake_case_      )      ):
  if a[i] == b[i]:
   res += "0"
  else:
   res += "1"
 return res







def      UpperCamelCase_						(					snake_case_       :       Tuple						,		snake_case_       :       Tuple      )					->     Optional[int]:






 '''simple docstring'''

 __lowerCAmelCase											=						int("""0b""" + data[0] + data[-1]						,		2      )
 __lowerCAmelCase											=						int("""0b""" + data[1:3]						,		2      )
 return bin(s[row][col]      )[2:]







def      UpperCamelCase_						(					snake_case_       :       Any						,		snake_case_       :       List[Any]						,		snake_case_       :       List[Any]						,		snake_case_       :       Dict						,		snake_case_       :       Dict      )					->     List[str]:






 '''simple docstring'''

 __lowerCAmelCase											=						message[:4]
 __lowerCAmelCase											=						message[4:]
 __lowerCAmelCase											=						apply_table(snake_case_						,		snake_case_      )
 __lowerCAmelCase											=						xor(snake_case_						,		snake_case_      )
 __lowerCAmelCase											=						apply_sbox(snake_case_						,		temp[:4]      )  # noqa: E741
 __lowerCAmelCase											=						apply_sbox(snake_case_						,		temp[4:]      )
 __lowerCAmelCase											=						"""0""" * (2 - len(snake_case_      )) + l  # noqa: E741
 __lowerCAmelCase											=						"""0""" * (2 - len(snake_case_      )) + r
 __lowerCAmelCase											=						apply_table(l + r						,		snake_case_      )
 __lowerCAmelCase											=						xor(snake_case_						,		snake_case_      )
 return temp + right


if __name__ == "__main__":
 _A			:      Optional[Any]					      =				input('''Enter 10 bit key: ''')
 _A			:      Optional[Any]					      =				input('''Enter 8 bit message: ''')

 _A			:      Tuple					      =				[6, 3, 7, 4, 8, 5, 10, 9]
 _A			:      Union[str, Any]					      =				[3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
 _A			:      Optional[int]					      =				[2, 4, 3, 1]
 _A			:      Optional[int]					      =				[2, 6, 3, 1, 4, 8, 5, 7]
 _A			:      Tuple					      =				[4, 1, 3, 5, 7, 2, 8, 6]
 _A			:      List[str]					      =				[4, 1, 2, 3, 2, 3, 4, 1]
 _A			:      List[str]					      =				[[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
 _A			:      Dict					      =				[[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

 # key generation
 _A			:      List[str]					      =				apply_table(key, paa_table)
 _A			:      Optional[int]					      =				temp[:5]
 _A			:      Optional[Any]					      =				temp[5:]
 _A			:      Dict					      =				left_shift(left)
 _A			:      Optional[Any]					      =				left_shift(right)
 _A			:      Tuple					      =				apply_table(left + right, pa_table)
 _A			:      List[Any]					      =				left_shift(left)
 _A			:      Optional[int]					      =				left_shift(right)
 _A			:      Optional[int]					      =				left_shift(left)
 _A			:      Dict					      =				left_shift(right)
 _A			:      Union[str, Any]					      =				apply_table(left + right, pa_table)

 # encryption
 _A			:      Any					      =				apply_table(message, IP)
 _A			:      List[str]					      =				function(expansion, sa, sa, keya, temp)
 _A			:      Dict					      =				temp[4:] + temp[:4]
 _A			:      List[str]					      =				function(expansion, sa, sa, keya, temp)
 _A			:      str					      =				apply_table(temp, IP_inv)
 print('''Cipher text is:''', CT)

 # decryption
 _A			:      Tuple					      =				apply_table(CT, IP)
 _A			:      Optional[int]					      =				function(expansion, sa, sa, keya, temp)
 _A			:      Dict					      =				temp[4:] + temp[:4]
 _A			:      List[str]					      =				function(expansion, sa, sa, keya, temp)
 _A			:      List[str]					      =				apply_table(temp, IP_inv)
 print('''Plain text after decypting is:''', PT)







'''simple docstring'''

from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
_A			:      List[Any]					      =				299792458

# Symbols
_A      ,     _A      ,     _A      ,     _A			:      Union[str, Any]					      =				symbols('''ct x y z''')







def      UpperCamelCase_						(					snake_case_       :       float      )					->     float:






 '''simple docstring'''

 if velocity > c:
  raise ValueError("""Speed must not exceed light speed 299,792,458 [m/s]!"""      )
 elif velocity < 1:
  # Usually the speed should be much higher than 1 (c order of magnitude)
  raise ValueError("""Speed must be greater than or equal to 1!"""      )

 return velocity / c







def      UpperCamelCase_						(					snake_case_       :       float      )					->     float:






 '''simple docstring'''

 return 1 / sqrt(1 - beta(snake_case_      ) ** 2      )







def      UpperCamelCase_						(					snake_case_       :       float      )					->     np.ndarray:






 '''simple docstring'''

 return np.array(
     [
         [gamma(snake_case_      ), -gamma(snake_case_      ) * beta(snake_case_      ), 0, 0],
         [-gamma(snake_case_      ) * beta(snake_case_      ), gamma(snake_case_      ), 0, 0],
         [0, 0, 1, 0],
         [0, 0, 0, 1],
     ]      )







def      UpperCamelCase_						(					snake_case_       :       float						,		snake_case_       :       np.ndarray | None = None      )					->     np.ndarray:






 '''simple docstring'''

 if event is None:
  __lowerCAmelCase											=						np.array([ct, x, y, z]      )  # Symbolic four vector
 else:
  event[0] *= c  # x0 is ct (speed of light * time)

 return transformation_matrix(snake_case_      ) @ event


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 # Example of symbolic vector:
 _A			:      str					      =				transform(29979245)
 print('''Example of four vector: ''')
 print(f'ct\' = {four_vector[0]}')
 print(f'x\' = {four_vector[1]}')
 print(f'y\' = {four_vector[2]}')
 print(f'z\' = {four_vector[3]}')

 # Substitute symbols with numerical values
 _A			:      int					      =				{ct: c, x: 1, y: 1, z: 1}
 _A			:      Any					      =				[four_vector[i].subs(sub_dict) for i in range(4)]

 print(f'\n{numerical_vector}')






