






"""simple docstring"""
lowerCAmelCase__    						=			'ABCDEFGHIJKLMNOPQRSTUVWXYZ'





def 				lowercase__		(					):
				_SCREAMING_SNAKE_CASE   :		str       		=    input('Enter message: '       )
				_SCREAMING_SNAKE_CASE   :		Optional[int]       		=    input('Enter key [alphanumeric]: '       )
				_SCREAMING_SNAKE_CASE   :		Tuple       		=    input('Encrypt/Decrypt [e/d]: '       )

				if mode.lower().startswith('e'       ):
								_SCREAMING_SNAKE_CASE   :		Dict       		=    'encrypt'
								_SCREAMING_SNAKE_CASE   :		Optional[int]       		=    encrypt_message(lowerCamelCase,						lowerCamelCase       )
				elif mode.lower().startswith('d'       ):
								_SCREAMING_SNAKE_CASE   :		List[Any]       		=    'decrypt'
								_SCREAMING_SNAKE_CASE   :		Dict       		=    decrypt_message(lowerCamelCase,						lowerCamelCase       )

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





def 				lowercase__		(					lowerCamelCase,						lowerCamelCase       ):
				return translate_message(lowerCamelCase,						lowerCamelCase,						'encrypt'       )





def 				lowercase__		(					lowerCamelCase,						lowerCamelCase       ):
				return translate_message(lowerCamelCase,						lowerCamelCase,						'decrypt'       )





def 				lowercase__		(					lowerCamelCase,						lowerCamelCase,						lowerCamelCase       ):
				_SCREAMING_SNAKE_CASE   :		Optional[int]       		=    []
				_SCREAMING_SNAKE_CASE   :		Any       		=    0
				_SCREAMING_SNAKE_CASE   :		int       		=    key.upper()

				for symbol in message:
								_SCREAMING_SNAKE_CASE   :		Tuple       		=    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(lowerCamelCase       )

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

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


if __name__ == "__main__":
			main()









"""simple docstring"""
def 				lowercase__		(					lowerCamelCase,						lowerCamelCase       ):
				return numa ^ numa < 0


if __name__ == "__main__":
			import doctest

			doctest.testmod()

