'''simple docstring'''




from ..utils import DummyObject, requires_backends





class 					__magic_name__		(					metaclass=_UpperCAmelCase):
			UpperCamelCase__       = ['''flax''', '''transformers''']







			def __init__(			self       :						Optional[Any]       ,    *lowercase_       :						int       ,    **lowercase_       :						int					):
										requires_backends(self       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						List[str]       ,    *lowercase_       :						Tuple       ,    **lowercase_       :						int					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						Optional[int]       ,    *lowercase_       :						str       ,    **lowercase_       :						str					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)





class 					__magic_name__		(					metaclass=_UpperCAmelCase):
			UpperCamelCase__       = ['''flax''', '''transformers''']







			def __init__(			self       :						Optional[Any]       ,    *lowercase_       :						Dict       ,    **lowercase_       :						Any					):
										requires_backends(self       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						Optional[int]       ,    *lowercase_       :						List[Any]       ,    **lowercase_       :						Tuple					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						Any       ,    *lowercase_       :						Union[str, Any]       ,    **lowercase_       :						str					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)





class 					__magic_name__		(					metaclass=_UpperCAmelCase):
			UpperCamelCase__       = ['''flax''', '''transformers''']







			def __init__(			self       :						str       ,    *lowercase_       :						int       ,    **lowercase_       :						Union[str, Any]					):
										requires_backends(self       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						int       ,    *lowercase_       :						Optional[int]       ,    **lowercase_       :						Any					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						Optional[Any]       ,    *lowercase_       :						int       ,    **lowercase_       :						str					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)





class 					__magic_name__		(					metaclass=_UpperCAmelCase):
			UpperCamelCase__       = ['''flax''', '''transformers''']







			def __init__(			self       :						str       ,    *lowercase_       :						int       ,    **lowercase_       :						Optional[Any]					):
										requires_backends(self       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						List[Any]       ,    *lowercase_       :						Tuple       ,    **lowercase_       :						List[Any]					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)







			@classmethod
			def 			SCREAMING_SNAKE_CASE_  (			cls       :						List[str]       ,    *lowercase_       :						Dict       ,    **lowercase_       :						Optional[Any]					):
										requires_backends(cls       ,    ["""flax""", """transformers"""]					)






'''simple docstring'''




_lowercase		:				int	       =		"ABCDEFGHIJKLMNOPQRSTUVWXYZ"




def 							lowerCamelCase			(   )    ->   None:
							lowercase_      :    List[Any]       		= input("""Enter message: """				)
							lowercase_      :    str       		= input("""Enter key [alphanumeric]: """				)
							lowercase_      :    List[Any]       		= input("""Encrypt/Decrypt [e/d]: """				)

							if mode.lower().startswith("""e"""				):
														lowercase_      :    List[str]       		= """encrypt"""
														lowercase_      :    Optional[int]       		= encrypt_message(UpperCAmelCase__   ,   UpperCAmelCase__				)
							elif mode.lower().startswith("""d"""				):
														lowercase_      :    Any       		= """decrypt"""
														lowercase_      :    Optional[Any]       		= decrypt_message(UpperCAmelCase__   ,   UpperCAmelCase__				)

							print(F'''\n{mode.title()}ed message:'''				)
							print(UpperCAmelCase__				)




def 							lowerCamelCase			(   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str				)    ->   str:
							return translate_message(UpperCAmelCase__   ,   UpperCAmelCase__   ,   """encrypt"""				)




def 							lowerCamelCase			(   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str				)    ->   str:
							return translate_message(UpperCAmelCase__   ,   UpperCAmelCase__   ,   """decrypt"""				)




def 							lowerCamelCase			(   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str				)    ->   str:
							lowercase_      :    Union[str, Any]       		= []
							lowercase_      :    List[Any]       		= 0
							lowercase_      :    str       		= key.upper()

							for symbol in message:
														lowercase_      :    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(UpperCAmelCase__				)

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

																					key_index += 1
																					if key_index == len(UpperCAmelCase__				):
																												lowercase_      :    Any       		= 0
														else:
																					translated.append(UpperCAmelCase__				)
							return "".join(UpperCAmelCase__				)


if __name__ == "__main__":
						main()





