

"""simple docstring"""




__UpperCAmelCase			=					'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def 	lowerCAmelCase    (       ):
 '''simple docstring'''





 UpperCAmelCase__       :	List[Any]        =       input("""Enter message: """   )
 UpperCAmelCase__       :	List[str]        =       input("""Enter key [alphanumeric]: """   )
 UpperCAmelCase__       :	List[str]        =       input("""Encrypt/Decrypt [e/d]: """   )

 if mode.lower().startswith("""e"""   ):
  UpperCAmelCase__       :	Any        =       "encrypt"
  UpperCAmelCase__       :	Any        =       encrypt_message(lowerCamelCase_				,     lowerCamelCase_   )
 elif mode.lower().startswith("""d"""   ):
  UpperCAmelCase__       :	str        =       "decrypt"
  UpperCAmelCase__       :	str        =       decrypt_message(lowerCamelCase_				,     lowerCamelCase_   )

 print(F"\n{mode.title()}ed message:"   )
 print(lowerCamelCase_   )
def 	lowerCAmelCase    (       __UpperCamelCase				,     __UpperCamelCase   ):
 '''simple docstring'''





 return translate_message(lowerCamelCase_				,     lowerCamelCase_				,     """encrypt"""   )
def 	lowerCAmelCase    (       __UpperCamelCase				,     __UpperCamelCase   ):
 '''simple docstring'''





 return translate_message(lowerCamelCase_				,     lowerCamelCase_				,     """decrypt"""   )
def 	lowerCAmelCase    (       __UpperCamelCase				,     __UpperCamelCase				,     __UpperCamelCase   ):
 '''simple docstring'''





 UpperCAmelCase__       :	int        =       []
 UpperCAmelCase__       :	Union[str, Any]        =       0
 UpperCAmelCase__       :	Optional[int]        =       key.upper()

 for symbol in message:
  UpperCAmelCase__       :	int        =       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_   ):
    UpperCAmelCase__       :	Dict        =       0
  else:
   translated.append(lowerCamelCase_   )
 return "".join(lowerCamelCase_   )


if __name__ == "__main__":
      main()







'''simple docstring'''

def        UpperCAmelCase_ (  lowerCamelCase_			):







 """simple docstring"""


 return number & 1 == 0


if __name__ == "__main__":
     import doctest

     doctest.testmod()





