





"""simple docstring"""





lowercase__				:List[Any]				   =       'ABCDEFGHIJKLMNOPQRSTUVWXYZ'


def       lowerCamelCase_       (   )						->None:





  """simple docstring"""


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

  if mode.lower().startswith('''e'''  ):
    __UpperCAmelCase    :						List[Any]       =						'''encrypt'''
    __UpperCAmelCase    :						Dict       =						encrypt_message(UpperCAmelCase_  ,			UpperCAmelCase_  )
  elif mode.lower().startswith('''d'''  ):
    __UpperCAmelCase    :						str       =						'''decrypt'''
    __UpperCAmelCase    :						Any       =						decrypt_message(UpperCAmelCase_  ,			UpperCAmelCase_  )

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


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  )						->str:





  """simple docstring"""


  return translate_message(UpperCAmelCase_  ,			UpperCAmelCase_  ,			'''encrypt'''  )


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  )						->str:





  """simple docstring"""


  return translate_message(UpperCAmelCase_  ,			UpperCAmelCase_  ,			'''decrypt'''  )


def       lowerCamelCase_       (   UpperCAmelCase_  ,			UpperCAmelCase_  ,			UpperCAmelCase_  )						->str:





  """simple docstring"""


  __UpperCAmelCase    :						List[Any]       =						[]
  __UpperCAmelCase    :						List[Any]       =						0
  __UpperCAmelCase    :						Union[str, Any]       =						key.upper()

  for symbol in message:
    __UpperCAmelCase    :						Union[str, Any]       =						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_  ):
        __UpperCAmelCase    :						Optional[int]       =						0
    else:
      translated.append(UpperCAmelCase_  )
  return "".join(UpperCAmelCase_  )


if __name__ == "__main__":
  main()






"""simple docstring"""





def       lowerCamelCase_       (   )						->str:





  """simple docstring"""


  for n in range(1  ,			1_00_00_00  ):
    yield n * (n + 1) // 2


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





  """simple docstring"""


  __UpperCAmelCase    :						Dict       =						1
  __UpperCAmelCase    :						Any       =						2
  while i * i <= n:
    __UpperCAmelCase    :						Tuple       =						0
    while n % i == 0:
      n //= i
      multiplicity += 1
    divisors_count *= multiplicity + 1
    i += 1
  if n > 1:
    divisors_count *= 2
  return divisors_count


def       lowerCamelCase_       (   )						->Optional[int]:





  """simple docstring"""


  return next(i for i in triangle_number_generator() if count_divisors(UpperCAmelCase_  ) > 5_00  )


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