


"""simple docstring"""
__SCREAMING_SNAKE_CASE							:      List[str]						=      'ABCDEFGHIJKLMNOPQRSTUVWXYZ'







def   _a			( )      ->			None:
							snake_case_          =						input("""Enter message: """			)
							snake_case_          =						input("""Enter key [alphanumeric]: """			)
							snake_case_          =						input("""Encrypt/Decrypt [e/d]: """			)

							if mode.lower().startswith("""e"""			):
														snake_case_          =						"""encrypt"""
														snake_case_          =						encrypt_message(_SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			)
							elif mode.lower().startswith("""d"""			):
														snake_case_          =						"""decrypt"""
														snake_case_          =						decrypt_message(_SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			)

							print(f"""\n{mode.title()}ed message:"""			)
							print(_SCREAMING_SNAKE_CASE			)







def   _a			( _SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			)      ->			str:
							return translate_message(_SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			,	"""encrypt"""			)







def   _a			( _SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			)      ->			str:
							return translate_message(_SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			,	"""decrypt"""			)







def   _a			( _SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE			)      ->			str:
							snake_case_          =						[]
							snake_case_          =						0
							snake_case_          =						key.upper()

							for symbol in message:
														snake_case_          =						LETTERS.find(symbol.upper()			)
														if num != -1:
																					if mode == "encrypt":
																												num += LETTERS.find(key[key_index]			)
																					elif mode == "decrypt":
																												num -= LETTERS.find(key[key_index]			)

																					num %= len(_SCREAMING_SNAKE_CASE			)

																					if symbol.isupper():
																												translated.append(LETTERS[num]			)
																					elif symbol.islower():
																												translated.append(LETTERS[num].lower()			)

																					key_index += 1
																					if key_index == len(_SCREAMING_SNAKE_CASE			):
																												snake_case_          =						0
														else:
																					translated.append(_SCREAMING_SNAKE_CASE			)
							return "".join(_SCREAMING_SNAKE_CASE			)


if __name__ == "__main__":
				main()







"""simple docstring"""
def   _a			( _SCREAMING_SNAKE_CASE			,	_SCREAMING_SNAKE_CASE = 0			)      ->			list:
							snake_case_          =						length or len(_SCREAMING_SNAKE_CASE			)
							snake_case_          =						False
							for i in range(length - 1			):
														if list_data[i] > list_data[i + 1]:
																					snake_case_    ,  snake_case_          =						list_data[i + 1], list_data[i]
																					snake_case_          =						True

							return list_data if not swapped else bubble_sort(_SCREAMING_SNAKE_CASE			,	length - 1			)


if __name__ == "__main__":
				import doctest

				doctest.testmod()



