





"""simple docstring"""






def     __A      (			a_						:int   ,       a_						:str)		->		List[str]:
				__a :						List[str]			       =  ''''''
				for i in table:
								res += inp[i - 1]
				return res

def     __A      (			a_						:Dict)		->		Union[str, Any]:
				return data[1:] + data[0]

def     __A      (			a_						:Optional[int]   ,       a_						:Dict)		->		Dict:
				__a :						Dict			       =  ''''''
				for i in range(len(a_)):
								if a[i] == b[i]:
												res += "0"
								else:
												res += "1"
				return res

def     __A      (			a_						:Optional[int]   ,       a_						:Any)		->		Dict:
				__a :						Optional[int]			       =  int('''0b''' + data[0] + data[-1]   ,       2)
				__a :						List[Any]			       =  int('''0b''' + data[1:3]   ,       2)
				return bin(s[row][col])[2:]

def     __A      (			a_						:Union[str, Any]   ,       a_						:str   ,       a_						:Optional[Any]   ,       a_						:int   ,       a_						:List[str])		->		Any:
				__a :						Optional[int]			       =  message[:4]
				__a :						Optional[Any]			       =  message[4:]
				__a :						Optional[Any]			       =  apply_table(a_   ,       a_)
				__a :						Optional[Any]			       =  xor(a_   ,       a_)
				__a :						str			       =  apply_sbox(a_   ,       temp[:4])  # noqa: E741
				__a :						int			       =  apply_sbox(a_   ,       temp[4:])
				__a :						List[Any]			       =  '''0''' * (2 - len(a_)) + l  # noqa: E741
				__a :						int			       =  '''0''' * (2 - len(a_)) + r
				__a :						str			       =  apply_table(l + r   ,       a_)
				__a :						str			       =  xor(a_   ,       a_)
				return temp + right


if __name__ == "__main__":
		A 			=  input('''Enter 10 bit key: ''')
		A 			=  input('''Enter 8 bit message: ''')

		A 			=  [6, 3, 7, 4, 8, 5, 10, 9]
		A 			=  [3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
		A 			=  [2, 4, 3, 1]
		A 			=  [2, 6, 3, 1, 4, 8, 5, 7]
		A 			=  [4, 1, 3, 5, 7, 2, 8, 6]
		A 			=  [4, 1, 2, 3, 2, 3, 4, 1]
		A 			=  [[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
		A 			=  [[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

		# key generation
		A 			=  apply_table(key, paa_table)
		A 			=  temp[:5]
		A 			=  temp[5:]
		A 			=  left_shift(left)
		A 			=  left_shift(right)
		A 			=  apply_table(left + right, pa_table)
		A 			=  left_shift(left)
		A 			=  left_shift(right)
		A 			=  left_shift(left)
		A 			=  left_shift(right)
		A 			=  apply_table(left + right, pa_table)

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

		# decryption
		A 			=  apply_table(CT, IP)
		A 			=  function(expansion, sa, sa, keya, temp)
		A 			=  temp[4:] + temp[:4]
		A 			=  function(expansion, sa, sa, keya, temp)
		A 			=  apply_table(temp, IP_inv)
		print('''Plain text after decypting is:''', PT)






"""simple docstring"""






from __future__ import annotations

import typing
from collections import Counter

def     __A      (			a_						:int)		->		typing.Counter[int]:
				__a :						typing.Counter[int]			       =  Counter()
				for base in range(1   ,       max_perimeter + 1):
								for perpendicular in range(a_   ,       max_perimeter + 1):
												__a :						Any			       =  (base * base + perpendicular * perpendicular) ** 0.5
												if hypotenuse == int(a_):
																__a :						List[Any]			       =  int(base + perpendicular + hypotenuse)
																if perimeter > max_perimeter:
																				continue
																triplets[perimeter] += 1
				return triplets

def     __A      (			a_						:int = 10_00)		->		int:
				__a :						Dict			       =  pythagorean_triple(a_)
				return triplets.most_common(1)[0][0]


if __name__ == "__main__":
		print(F'Perimeter {solution()} has maximum solutions')