
def     A__   (  lowerCamelCase       ,      lowerCamelCase  )					->		Any:
				UpperCamelCase_:							Union[str, Any]		=  """"""
				for i in table:
								res += inp[i - 1]
				return res







def     A__   (  lowerCamelCase  )					->		int:
				return data[1:] + data[0]







def     A__   (  lowerCamelCase       ,      lowerCamelCase  )					->		Tuple:
				UpperCamelCase_:							List[str]		=  """"""
				for i in range(len(lowerCamelCase  )  ):
								if a[i] == b[i]:
												res += "0"
								else:
												res += "1"
				return res







def     A__   (  lowerCamelCase       ,      lowerCamelCase  )					->		Union[str, Any]:
				UpperCamelCase_:							Dict		=  int("""0b""" + data[0] + data[-1]       ,      2  )
				UpperCamelCase_:							List[str]		=  int("""0b""" + data[1:3]       ,      2  )
				return bin(s[row][col]  )[2:]







def     A__   (  lowerCamelCase       ,      lowerCamelCase       ,      lowerCamelCase       ,      lowerCamelCase       ,      lowerCamelCase  )					->		Tuple:
				UpperCamelCase_:							int		=  message[:4]
				UpperCamelCase_:							Optional[int]		=  message[4:]
				UpperCamelCase_:							Optional[Any]		=  apply_table(lowerCamelCase       ,      lowerCamelCase  )
				UpperCamelCase_:							List[str]		=  xor(lowerCamelCase       ,      lowerCamelCase  )
				UpperCamelCase_:							int		=  apply_sbox(lowerCamelCase       ,      temp[:4]  )  # noqa: E741
				UpperCamelCase_:							int		=  apply_sbox(lowerCamelCase       ,      temp[4:]  )
				UpperCamelCase_:							int		=  """0""" * (2 - len(lowerCamelCase  )) + l  # noqa: E741
				UpperCamelCase_:							Any		=  """0""" * (2 - len(lowerCamelCase  )) + r
				UpperCamelCase_:							List[str]		=  apply_table(l + r       ,      lowerCamelCase  )
				UpperCamelCase_:							int		=  xor(lowerCamelCase       ,      lowerCamelCase  )
				return temp + right


if __name__ == "__main__":
							lowerCamelCase_  :	Any 				=					input("""Enter 10 bit key: """)
							lowerCamelCase_  :	Any 				=					input("""Enter 8 bit message: """)

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

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

							# encryption
							lowerCamelCase_  :	Optional[int] 				=					apply_table(message, IP)
							lowerCamelCase_  :	Union[str, Any] 				=					function(expansion, sa, sa, keya, temp)
							lowerCamelCase_  :	Tuple 				=					temp[4:] + temp[:4]
							lowerCamelCase_  :	List[Any] 				=					function(expansion, sa, sa, keya, temp)
							lowerCamelCase_  :	Tuple 				=					apply_table(temp, IP_inv)
							print("""Cipher text is:""", CT)

							# decryption
							lowerCamelCase_  :	Tuple 				=					apply_table(CT, IP)
							lowerCamelCase_  :	Union[str, Any] 				=					function(expansion, sa, sa, keya, temp)
							lowerCamelCase_  :	Dict 				=					temp[4:] + temp[:4]
							lowerCamelCase_  :	List[Any] 				=					function(expansion, sa, sa, keya, temp)
							lowerCamelCase_  :	List[Any] 				=					apply_table(temp, IP_inv)
							print("""Plain text after decypting is:""", PT)








def     A__   (  lowerCamelCase  )					->		list:
				return [
				    txt[:a] + txt[a].upper() + txt[a + 1 :]
				    for a in range(len(lowerCamelCase  )  )
				    if txt[a].isalpha()
				]


if __name__ == "__main__":
							__import__("""doctest""").testmod()






