

_UpperCAmelCase     						=      """ABCDEFGHIJKLMNOPQRSTUVWXYZ"""


def       __UpperCamelCase     ()  ->	None:
      A 			=					input('Enter message: '  )
      A 			=					input('Enter key [alphanumeric]: '  )
      A 			=					input('Encrypt/Decrypt [e/d]: '  )

      if mode.lower().startswith('e'  ):
            A 			=					"""encrypt"""
            A 			=					encrypt_message(lowerCAmelCase,     lowerCAmelCase  )
      elif mode.lower().startswith('d'  ):
            A 			=					"""decrypt"""
            A 			=					decrypt_message(lowerCAmelCase,     lowerCAmelCase  )

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


def       __UpperCamelCase     (lowerCAmelCase       :	List[Any],     lowerCAmelCase       :	Optional[Any]  )  ->	str:
      return translate_message(lowerCAmelCase,     lowerCAmelCase,     'encrypt'  )


def       __UpperCamelCase     (lowerCAmelCase       :	List[Any],     lowerCAmelCase       :	Union[str, Any]  )  ->	str:
      return translate_message(lowerCAmelCase,     lowerCAmelCase,     'decrypt'  )


def       __UpperCamelCase     (lowerCAmelCase       :	Dict,     lowerCAmelCase       :	Optional[Any],     lowerCAmelCase       :	Union[str, Any]  )  ->	str:
      A 			=					[]
      A 			=					0
      A 			=					key.upper()

      for symbol in message:
            A 			=					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  ):
                        A 			=					0
            else:
                  translated.append(lowerCAmelCase  )
      return "".join(lowerCAmelCase  )


if __name__ == "__main__":
  main()





lowerCamelCase_    :			Tuple    =	{
    """meter""": """m""",
    """kilometer""": """km""",
    """megametre""": """Mm""",
    """gigametre""": """Gm""",
    """terametre""": """Tm""",
    """petametre""": """Pm""",
    """exametre""": """Em""",
    """zettametre""": """Zm""",
    """yottametre""": """Ym""",
}
# Exponent of the factor(meter)
lowerCamelCase_    :			Union[str, Any]    =	{
    """m""": 0,
    """km""": 3,
    """Mm""": 6,
    """Gm""": 9,
    """Tm""": 12,
    """Pm""": 15,
    """Em""": 18,
    """Zm""": 21,
    """Ym""": 24,
}







def 							A__       (    lowerCamelCase  ,     lowerCamelCase  ,     lowerCamelCase    )	->						float:
				UpperCamelCase_:				Any						=    from_type.lower().strip("""s"""    )
				UpperCamelCase_:				int						=    to_type.lower().strip("""s"""    )

				UpperCamelCase_:				Any						=    UNIT_SYMBOL.get(lowerCamelCase  ,     lowerCamelCase    )
				UpperCamelCase_:				str						=    UNIT_SYMBOL.get(lowerCamelCase  ,     lowerCamelCase    )

				if from_sanitized not in METRIC_CONVERSION:
								UpperCamelCase_:				Optional[int]						=    (
								    F'''Invalid \'from_type\' value: {from_type!r}.\n'''
								    F'''Conversion abbreviations are: {", ".join(lowerCamelCase    )}'''
								)
								raise ValueError(lowerCamelCase    )
				if to_sanitized not in METRIC_CONVERSION:
								UpperCamelCase_:				Dict						=    (
								    F'''Invalid \'to_type\' value: {to_type!r}.\n'''
								    F'''Conversion abbreviations are: {", ".join(lowerCamelCase    )}'''
								)
								raise ValueError(lowerCamelCase    )
				UpperCamelCase_:				Union[str, Any]						=    METRIC_CONVERSION[from_sanitized]
				UpperCamelCase_:				str						=    METRIC_CONVERSION[to_sanitized]
				UpperCamelCase_:				Tuple						=    1

				if from_exponent > to_exponent:
								UpperCamelCase_:				Union[str, Any]						=    from_exponent - to_exponent
				else:
								UpperCamelCase_:				Dict						=    -(to_exponent - from_exponent)

				return value * pow(10  ,     lowerCamelCase    )


if __name__ == "__main__":
							from doctest import testmod

							testmod()






