



from typing import Literal

A_		:  str										=  '''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''


def 						UpperCAmelCase__   (   UpperCAmelCase__			:str			,       UpperCAmelCase__			:str			,       UpperCAmelCase__			:Literal["encrypt", "decrypt"]       ):






 '''simple docstring'''

 a							=		LETTERS if mode == "decrypt" else key
 a							=		key if mode == "decrypt" else LETTERS
 a							=		""
 # loop through each symbol in the message
 for symbol in message:
  if symbol.upper() in chars_a:
   # encrypt/decrypt the symbol
   a							=		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 						UpperCAmelCase__   (   UpperCAmelCase__			:str			,       UpperCAmelCase__			:str       ):






 '''simple docstring'''

 return translate_message(UpperCAmelCase__			,       UpperCAmelCase__			,       "encrypt"       )


def 						UpperCAmelCase__   (   UpperCAmelCase__			:str			,       UpperCAmelCase__			:str       ):






 '''simple docstring'''

 return translate_message(UpperCAmelCase__			,       UpperCAmelCase__			,       "decrypt"       )


def 						UpperCAmelCase__   (   ):






 '''simple docstring'''

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

 if mode == "encrypt":
  a							=		encrypt_message(UpperCAmelCase__			,       UpperCAmelCase__       )
 elif mode == "decrypt":
  a							=		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'''




def _UpperCamelCase (							SCREAMING_SNAKE_CASE_				):
     return " ".join([word[::-1] for word in input_str.split()]				)


if __name__ == "__main__":
 import doctest

 doctest.testmod()




