






'''simple docstring'''






def        _SCREAMING_SNAKE_CASE  (				A  :       Any  )    -> Any:







			"""simple docstring"""
			__snake_case				:      int     							= ''
			for ch in key:
						if ch == " " or ch not in key_no_dups and ch.isalpha():
									key_no_dups += ch
			return key_no_dups




def        _SCREAMING_SNAKE_CASE  (				A  :       List[str]  )    -> Tuple:







			"""simple docstring"""
			__snake_case				:      int     							= [chr(i + 65  ) for i in range(26  )]
			# Remove duplicate characters from key
			__snake_case				:      List[str]     							= remove_duplicates(key.upper()  )
			__snake_case				:      Any     							= len(_UpperCAmelCase  )
			# First fill cipher with key characters
			__snake_case				:      List[Any]     							= {alphabet[i]: char for i, char in enumerate(_UpperCAmelCase  )}
			# Then map remaining characters in alphabet to
			# the alphabet from the beginning
			for i in range(len(_UpperCAmelCase  )  ,		26  ):
						__snake_case				:      Tuple     							= alphabet[i - offset]
						# Ensure we are not mapping letters to letters previously mapped
						while char in key:
									offset -= 1
									__snake_case				:      Optional[Any]     							= alphabet[i - offset]
						__snake_case				:      Union[str, Any]     							= char
			return cipher_alphabet




def        _SCREAMING_SNAKE_CASE  (				A  :       List[Any]  ,		A  :       str  )    -> Tuple:







			"""simple docstring"""
			return "".join(cipher_map.get(_UpperCAmelCase  ,		_UpperCAmelCase  ) for ch in message.upper()  )




def        _SCREAMING_SNAKE_CASE  (				A  :       Union[str, Any]  ,		A  :       List[Any]  )    -> Union[str, Any]:







			"""simple docstring"""
			__snake_case				:      List[Any]     							= {v: k for k, v in cipher_map.items()}
			return "".join(rev_cipher_map.get(_UpperCAmelCase  ,		_UpperCAmelCase  ) for ch in message.upper()  )




def        _SCREAMING_SNAKE_CASE  (				)    -> Union[str, Any]:







			"""simple docstring"""
			__snake_case				:      List[Any]     							= input('Enter message to encode or decode: '  ).strip()
			__snake_case				:      Optional[Any]     							= input('Enter keyword: '  ).strip()
			__snake_case				:      List[str]     							= input('Encipher or decipher? E/D:'  ).strip()[0].lower()
			try:
						__snake_case				:      Any     							= {'e': encipher, 'd': decipher}[option]
			except KeyError:
						raise KeyError('invalid input option'  )
			__snake_case				:      Tuple     							= create_cipher_map(_UpperCAmelCase  )
			print(func(_UpperCAmelCase  ,		_UpperCAmelCase  )  )


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						main()







'''simple docstring'''






__A    	=   {str(digit): digit**5 for digit in range(1_0)}




def        _SCREAMING_SNAKE_CASE  (				A  :       int  )    -> int:







   """simple docstring"""
   return sum(DIGITS_FIFTH_POWER[digit] for digit in str(A  )  )




def        _SCREAMING_SNAKE_CASE  (				)    -> int:







   """simple docstring"""
   return sum(
       number
       for number in range(10_00  ,		1_00_00_00  )
       if number == digits_fifth_powers_sum(A  )  )


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