






def 				_lowerCAmelCase      (_lowerCAmelCase):
					return n * (2 * n - 1)



def 				_lowerCAmelCase      (_lowerCAmelCase):
					UpperCamelCase_											=				(1 + 24 * n) ** 0.5
					return ((1 + root) / 6) % 1 == 0



def 				_lowerCAmelCase      (_lowerCAmelCase = 1_44):
					UpperCamelCase_											=				start
					UpperCamelCase_											=				hexagonal_num(_lowerCAmelCase)
					while not is_pentagonal(_lowerCAmelCase):
										n += 1
										UpperCamelCase_											=				hexagonal_num(_lowerCAmelCase)
					return num


if __name__ == "__main__":
	print(F"{solution()} = ")





from typing import Literal

UpperCAmelCase				:							Tuple								="""ABCDEFGHIJKLMNOPQRSTUVWXYZ"""



def 				_lowerCAmelCase      (_lowerCAmelCase				,		_lowerCAmelCase				,		_lowerCAmelCase):
					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 				_lowerCAmelCase      (_lowerCAmelCase				,		_lowerCAmelCase):
					return translate_message(_lowerCAmelCase				,		_lowerCAmelCase				,		"encrypt")



def 				_lowerCAmelCase      (_lowerCAmelCase				,		_lowerCAmelCase):
					return translate_message(_lowerCAmelCase				,		_lowerCAmelCase				,		"decrypt")



def 				_lowerCAmelCase      ():
					UpperCamelCase_											=				"Hello World"
					UpperCamelCase_											=				"QWERTYUIOPASDFGHJKLZXCVBNM"
					UpperCamelCase_											=				"decrypt"  # set to 'encrypt' or 'decrypt'

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


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()
