
"""simple docstring"""


import random
import sys

lowerCAmelCase								=						"""ABCDEFGHIJKLMNOPQRSTUVWXYZ"""






def        lowerCAmelCase_       (		)       ->None:
			lowerCamelCase__     :					List[str]		=input('Enter message: '      )
			lowerCamelCase__     :					Dict		='LFWOAYUISVKMNXPBDCRJTQEGHZ'
			lowerCamelCase__     :					str		=input('Encrypt/Decrypt [e/d]: '      )

			check_valid_key(snake_case_      )

			if resp.lower().startswith('e'      ):
						lowerCamelCase__     :					List[str]		='encrypt'
						lowerCamelCase__     :					Union[str, Any]		=encrypt_message(snake_case_							,   snake_case_      )
			elif resp.lower().startswith('d'      ):
						lowerCamelCase__     :					Union[str, Any]		='decrypt'
						lowerCamelCase__     :					Optional[Any]		=decrypt_message(snake_case_							,   snake_case_      )

			print(f"""\n{mode.title()}ion: \n{translated}"""      )






def        lowerCAmelCase_       (		snake_case_		:      str      )       ->None:
			lowerCamelCase__     :					int		=list(snake_case_      )
			lowerCamelCase__     :					str		=list(snake_case_      )
			key_list.sort()
			letters_list.sort()

			if key_list != letters_list:
						sys.exit('Error in the key or symbol set.'      )






def        lowerCAmelCase_       (		snake_case_		:      str							,   snake_case_		:      str      )       ->str:
			return translate_message(snake_case_							,   snake_case_							,   'encrypt'      )






def        lowerCAmelCase_       (		snake_case_		:      str							,   snake_case_		:      str      )       ->str:
			return translate_message(snake_case_							,   snake_case_							,   'decrypt'      )






def        lowerCAmelCase_       (		snake_case_		:      str							,   snake_case_		:      str							,   snake_case_		:      str      )       ->str:
			lowerCamelCase__     :					int		=''
			lowerCamelCase__     :					str		=LETTERS
			lowerCamelCase__     :					Union[str, Any]		=key

			if mode == "decrypt":
						lowerCamelCase__	,    lowerCamelCase__     :					Tuple		=chars_b, chars_a

			for symbol in message:
						if symbol.upper() in chars_a:
									lowerCamelCase__     :					Any		=chars_a.find(symbol.upper()      )
									if symbol.isupper():
												translated += chars_b[sym_index].upper()
									else:
												translated += chars_b[sym_index].lower()
						else:
									translated += symbol

			return translated






def        lowerCAmelCase_       (		)       ->str:
			lowerCamelCase__     :					List[Any]		=list(snake_case_      )
			random.shuffle(snake_case_      )
			return "".join(snake_case_      )


if __name__ == "__main__":
							main()

"""simple docstring"""


from math import cos, sin






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__     :					List[Any]		=float(snake_case_      )
			return [[scaling_factor * int(x == y      ) for x in range(2      )] for y in range(2      )]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Union[str, Any]		=cos(snake_case_      ), sin(snake_case_      )
			return [[c, -s], [s, c]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Optional[Any]		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[c * c, cs], [cs, s * s]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					str		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f"""    {scaling(5) = }""")
print(f"""  {rotation(45) = }""")
print(f"""{projection(45) = }""")

print(f"""{reflection(45) = }""")