
'''simple docstring'''





from typing import Literal

A							     = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def 	snake_case_							(				_a  :				Optional[int]			,       _a  :				Any			,       _a  :				Union[str, Any]      ):
      snake_case_    							=				LETTERS if mode == "decrypt" else key
      snake_case_    							=				key if mode == "decrypt" else LETTERS
      snake_case_    							=				""
      # loop through each symbol in the message
      for symbol in message:
            if symbol.upper() in chars_a:
                  # encrypt/decrypt the symbol
                  snake_case_    							=				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 	snake_case_							(				_a  :				Optional[int]			,       _a  :				int      ):
      return translate_message(_SCREAMING_SNAKE_CASE			,       _SCREAMING_SNAKE_CASE			,       "encrypt"      )
def 	snake_case_							(				_a  :				Tuple			,       _a  :				List[str]      ):
      return translate_message(_SCREAMING_SNAKE_CASE			,       _SCREAMING_SNAKE_CASE			,       "decrypt"      )
def 	snake_case_							(				):
      snake_case_    							=				"Hello World"
      snake_case_    							=				"QWERTYUIOPASDFGHJKLZXCVBNM"
      snake_case_    							=				"decrypt"  # set to 'encrypt' or 'decrypt'

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


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     main()



def 		lowerCAmelCase_     (     _SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE  )   ->      Dict:

							"""simple docstring"""






							if power < 0:
														return -1
							base %= mod
							_UpperCAmelCase  :			Optional[Any]	       =		1

							while power > 0:
														if power & 1:
																					_UpperCAmelCase  :			Optional[Any]	       =		(result * base) % mod
														_UpperCAmelCase  :			List[str]	       =		power >> 1
														_UpperCAmelCase  :			Optional[int]	       =		(base * base) % mod

							return result




def 		lowerCAmelCase_     (     )   ->      List[str]:

							"""simple docstring"""






							print(modular_exponential(3      ,	2_0_0      ,	1_3  )  )


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				main()




