




from typing import Literal

__A						:		List[str]          =						"ABCDEFGHIJKLMNOPQRSTUVWXYZ"





def      UpperCAmelCase  (						UpperCamelCase__						,			UpperCamelCase__						,			UpperCamelCase__   )     ->     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      UpperCAmelCase  (						UpperCamelCase__						,			UpperCamelCase__   )     ->     str:







				'''simple docstring'''


				return translate_message(UpperCamelCase__						,			UpperCamelCase__						,			"""encrypt"""   )





def      UpperCAmelCase  (						UpperCamelCase__						,			UpperCamelCase__   )     ->     str:







				'''simple docstring'''


				return translate_message(UpperCamelCase__						,			UpperCamelCase__						,			"""decrypt"""   )





def      UpperCAmelCase  (						)     ->     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'''




import os




def     snake_case__     (			) -> int:
					A_			:  List[str]			=				os.path.dirname(os.path.realpath(lowerCamelCase__      )      )
					A_			:  str			=				os.path.join(lowerCamelCase__      ,		'''triangle.txt'''      )

					with open(lowerCamelCase__      ) as in_file:
										A_			:  List[str]			=				[[int(lowerCamelCase__      ) for i in line.split()] for line in in_file]

					while len(lowerCamelCase__      ) != 1:
										A_			:  List[str]			=				triangle.pop()
										A_			:  Optional[Any]			=				triangle[-1]
										for j in range(len(lowerCamelCase__      ) - 1      ):
															curr_row[j] += max(last_row[j]      ,		last_row[j + 1]      )
					return triangle[0][0]


if __name__ == "__main__":
							print(solution())



