
'''simple docstring'''

from typing import Literal

UpperCAmelCase__				:	Optional[int]					=						"ABCDEFGHIJKLMNOPQRSTUVWXYZ"







def 					A       ( UpperCamelCase_   :       str  ,		UpperCamelCase_   :       str  ,		UpperCamelCase_   :       Literal["encrypt", "decrypt"] )   ->    str:







			'''simple docstring'''



			lowerCAmelCase__									=							LETTERS if mode == "decrypt" else key
			lowerCAmelCase__									=							key if mode == "decrypt" else LETTERS
			lowerCAmelCase__									=							""
			# loop through each symbol in the message
			for symbol in message:
						if symbol.upper() in chars_a:
									# encrypt/decrypt the symbol
									lowerCAmelCase__									=							chars_a.find(symbol.upper() )
									if symbol.isupper():
												translated += chars_b[sym_index].upper()
									else:
												translated += chars_b[sym_index].lower()
						else:
									# symbol is not in LETTERS, just add it
									translated += symbol
			return translated







def 					A       ( UpperCamelCase_   :       str  ,		UpperCamelCase_   :       str )   ->    str:







			'''simple docstring'''



			return translate_message(UpperCamelCase_  ,		UpperCamelCase_  ,		"encrypt" )







def 					A       ( UpperCamelCase_   :       str  ,		UpperCamelCase_   :       str )   ->    str:







			'''simple docstring'''



			return translate_message(UpperCamelCase_  ,		UpperCamelCase_  ,		"decrypt" )







def 					A       ( )   ->    None:







			'''simple docstring'''



			lowerCAmelCase__									=							"Hello World"
			lowerCAmelCase__									=							"QWERTYUIOPASDFGHJKLZXCVBNM"
			lowerCAmelCase__									=							"decrypt"  # set to 'encrypt' or 'decrypt'

			if mode == "encrypt":
						lowerCAmelCase__									=							encrypt_message(UpperCamelCase_  ,		UpperCamelCase_ )
			elif mode == "decrypt":
						lowerCAmelCase__									=							decrypt_message(UpperCamelCase_  ,		UpperCamelCase_ )
			print(F"""Using the key {key}, the {mode}ed message is: {translated}""" )


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		main()







'''simple docstring'''

UpperCAmelCase__				:	List[str]					=						"\n# Transformers installation\n! pip install transformers datasets evaluate\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/transformers.git\n"

UpperCAmelCase__				:	Any					=						[{"type": "code", "content": INSTALL_CONTENT}]
UpperCAmelCase__				:	Union[str, Any]					=						{
    "{processor_class}": "FakeProcessorClass",
    "{model_class}": "FakeModelClass",
    "{object_class}": "FakeObjectClass",
}





