





from typing import Literal

UpperCAmelCase_											=  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def     A__					(						SCREAMING_SNAKE_CASE_      :			str							,  SCREAMING_SNAKE_CASE_      :			str							,  SCREAMING_SNAKE_CASE_      :			Literal["encrypt", "decrypt"]	)     ->     str:






			"""simple docstring"""







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






			"""simple docstring"""







			return translate_message(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_							,  '''encrypt'''	)
def     A__					(						SCREAMING_SNAKE_CASE_      :			str							,  SCREAMING_SNAKE_CASE_      :			str	)     ->     str:






			"""simple docstring"""







			return translate_message(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_							,  '''decrypt'''	)
def     A__					(						)     ->     None:






			"""simple docstring"""







			_UpperCAmelCase											=      '''Hello World'''
			_UpperCAmelCase											=      '''QWERTYUIOPASDFGHJKLZXCVBNM'''
			_UpperCAmelCase											=      '''decrypt'''  # set to 'encrypt' or 'decrypt'

			if mode == "encrypt":
						_UpperCAmelCase											=      encrypt_message(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	)
			elif mode == "decrypt":
						_UpperCAmelCase											=      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     A__					(						SCREAMING_SNAKE_CASE_      :			List[Any]							,  SCREAMING_SNAKE_CASE_      :			Dict	)     ->     Any:






   """simple docstring"""







   if n == 0:
      return 1

   elif n % 2 == 1:
      return binary_exponentiation(SCREAMING_SNAKE_CASE_							,  n - 1	) * a

   else:
      _UpperCAmelCase											=      binary_exponentiation(SCREAMING_SNAKE_CASE_							,  n / 2	)
      return b * b


if __name__ == "__main__":
   try:
      UpperCAmelCase_											=  int(input("Enter Base : ").strip())
      UpperCAmelCase_											=  int(input("Enter Power : ").strip())
   except ValueError:
      print("Invalid literal for integer")

   UpperCAmelCase_											=  binary_exponentiation(BASE, POWER)
   print(f'''{BASE}^({POWER}) : {RESULT}''')