SCREAMING_SNAKE_CASE__		:					int						=					"ABCDEFGHIJKLMNOPQRSTUVWXYZ"







def     _a				(      ):







     '''simple docstring'''


     SCREAMING_SNAKE_CASE__				:				List[Any]			=		input('Enter message: ' )
     SCREAMING_SNAKE_CASE__				:				Tuple			=		input('Enter key [alphanumeric]: ' )
     SCREAMING_SNAKE_CASE__				:				str			=		input('Encrypt/Decrypt [e/d]: ' )

     if mode.lower().startswith('e' ):
          SCREAMING_SNAKE_CASE__				:				Union[str, Any]			=		'encrypt'
          SCREAMING_SNAKE_CASE__				:				int			=		encrypt_message(lowercase__     ,  lowercase__ )
     elif mode.lower().startswith('d' ):
          SCREAMING_SNAKE_CASE__				:				Optional[int]			=		'decrypt'
          SCREAMING_SNAKE_CASE__				:				Optional[int]			=		decrypt_message(lowercase__     ,  lowercase__ )

     print(f'''\n{mode.title()}ed message:''' )
     print(lowercase__ )







def     _a				(      lowercase__  :			str     ,  lowercase__  :			str ):







     '''simple docstring'''


     return translate_message(lowercase__     ,  lowercase__     ,  'encrypt' )







def     _a				(      lowercase__  :			str     ,  lowercase__  :			str ):







     '''simple docstring'''


     return translate_message(lowercase__     ,  lowercase__     ,  'decrypt' )







def     _a				(      lowercase__  :			str     ,  lowercase__  :			str     ,  lowercase__  :			str ):







     '''simple docstring'''


     SCREAMING_SNAKE_CASE__				:				Union[str, Any]			=		[]
     SCREAMING_SNAKE_CASE__				:				Optional[Any]			=		0
     SCREAMING_SNAKE_CASE__				:				Union[str, Any]			=		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(lowercase__ )

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

               key_index += 1
               if key_index == len(lowercase__ ):
                    SCREAMING_SNAKE_CASE__				:				Dict			=		0
          else:
               translated.append(lowercase__ )
     return "".join(lowercase__ )


if __name__ == "__main__":
      main()




def     _a				(      lowercase__  :			int = 1_00_00_00 ):







     '''simple docstring'''


     SCREAMING_SNAKE_CASE__				:				str			=		[i - 1 for i in range(limit + 1 )]

     for i in range(2     ,  limit + 1 ):
          if phi[i] == i - 1:
               for j in range(2 * i     ,  limit + 1     ,  lowercase__ ):
                    phi[j] -= phi[j] // i

     return sum(phi[2 : limit + 1] )


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



