




import random
import sys

__A    :				List[Any]    						=	"""ABCDEFGHIJKLMNOPQRSTUVWXYZ"""
def        lowerCamelCase_     (     ):
			'''simple docstring'''
			SCREAMING_SNAKE_CASE     =       input("""Enter message: """ )
			SCREAMING_SNAKE_CASE     =       """LFWOAYUISVKMNXPBDCRJTQEGHZ"""
			SCREAMING_SNAKE_CASE     =       input("""Encrypt/Decrypt [e/d]: """ )

			check_valid_key(__UpperCamelCase )

			if resp.lower().startswith("""e""" ):
						SCREAMING_SNAKE_CASE     =       """encrypt"""
						SCREAMING_SNAKE_CASE     =       encrypt_message(__UpperCamelCase       ,						__UpperCamelCase )
			elif resp.lower().startswith("""d""" ):
						SCREAMING_SNAKE_CASE     =       """decrypt"""
						SCREAMING_SNAKE_CASE     =       decrypt_message(__UpperCamelCase       ,						__UpperCamelCase )

			print(f"""\n{mode.title()}ion: \n{translated}""" )
def        lowerCamelCase_     (     SCREAMING_SNAKE_CASE ):
			'''simple docstring'''
			SCREAMING_SNAKE_CASE     =       list(__UpperCamelCase )
			SCREAMING_SNAKE_CASE     =       list(__UpperCamelCase )
			key_list.sort()
			letters_list.sort()

			if key_list != letters_list:
						sys.exit("""Error in the key or symbol set.""" )
def        lowerCamelCase_     (     SCREAMING_SNAKE_CASE       ,						SCREAMING_SNAKE_CASE ):
			'''simple docstring'''
			return translate_message(__UpperCamelCase       ,						__UpperCamelCase       ,						"""encrypt""" )
def        lowerCamelCase_     (     SCREAMING_SNAKE_CASE       ,						SCREAMING_SNAKE_CASE ):
			'''simple docstring'''
			return translate_message(__UpperCamelCase       ,						__UpperCamelCase       ,						"""decrypt""" )
def        lowerCamelCase_     (     SCREAMING_SNAKE_CASE       ,						SCREAMING_SNAKE_CASE       ,						SCREAMING_SNAKE_CASE ):
			'''simple docstring'''
			SCREAMING_SNAKE_CASE     =       """"""
			SCREAMING_SNAKE_CASE     =       LETTERS
			SCREAMING_SNAKE_CASE     =       key

			if mode == "decrypt":
						SCREAMING_SNAKE_CASE  ,	SCREAMING_SNAKE_CASE     =       chars_b, chars_a

			for symbol in message:
						if symbol.upper() in chars_a:
									SCREAMING_SNAKE_CASE     =       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_     (     ):
			'''simple docstring'''
			SCREAMING_SNAKE_CASE     =       list(__UpperCamelCase )
			random.shuffle(__UpperCamelCase )
			return "".join(__UpperCamelCase )


if __name__ == "__main__":
		main()









"""simple docstring"""






from typing import Callable
def 		A_	(   __UpperCamelCase     :				Callable				):

		def wrapper(__UpperCamelCase     :				Optional[Any]				):
				lowercase										=							function_with_docstring.__doc__
				return target_function

		return wrapper