"""simple docstring"""


__UpperCamelCase       :    Any         =		[chr(i) for i in range(3_2, 1_2_6)]
__UpperCamelCase       :    Any         =		list(range(len(alphabets)))
__UpperCamelCase       :    Optional[Any]         =		list(range(len(alphabets)))
__UpperCamelCase       :    Optional[int]         =		list(range(len(alphabets)))
__UpperCamelCase       :    str         =		list(reversed(range(len(alphabets))))
__UpperCamelCase       :    List[Any]         =		[]
__UpperCamelCase       :    Dict         =		0


def   __UpperCAmelCase     (	):
   global gear_one_pos
   global gear_two_pos
   global gear_three_pos
   _lowercase							     =       gear_one[0]
   gear_one.append(__lowerCAmelCase       )
   del gear_one[0]
   gear_one_pos += 1
   if gear_one_pos % int(len(__lowerCAmelCase       )       ) == 0:
      _lowercase							     =       gear_two[0]
      gear_two.append(__lowerCAmelCase       )
      del gear_two[0]
      gear_two_pos += 1
      if gear_two_pos % int(len(__lowerCAmelCase       )       ) == 0:
         _lowercase							     =       gear_three[0]
         gear_three.append(__lowerCAmelCase       )
         del gear_three[0]
         gear_three_pos += 1


def   __UpperCAmelCase     (	_snake_case		:       List[Any]       ):
   _lowercase							     =       alphabets.index(__lowerCAmelCase       )
   _lowercase							     =       gear_one[target]
   _lowercase							     =       gear_two[target]
   _lowercase							     =       gear_three[target]
   _lowercase							     =       reflector[target]
   _lowercase							     =       gear_three.index(__lowerCAmelCase       )
   _lowercase							     =       gear_two.index(__lowerCAmelCase       )
   _lowercase							     =       gear_one.index(__lowerCAmelCase       )
   code.append(alphabets[target]       )
   rotator()


if __name__ == "__main__":
  __UpperCamelCase       :    List[Any]         =		list(input("Type your message:\n"))
  while True:
    try:
      __UpperCamelCase       :    List[Any]         =		int(input("Please set token:(must be only digits)\n"))
      break
    except Exception as error:
      print(error)
  for _ in range(token):
    rotator()
  for j in decode:
    engine(j)
  print("\n" + "".join(code))
  print(
      f'''\nYour Token is {token} please write it down.\nIf you want to decode '''
      "this message again you should input same digits as token!"
  )



'''simple docstring'''


def 			__lowerCAmelCase			(__lowerCAmelCase ):
		return "".join(chr(ord(__lowerCAmelCase ) + 32 ) if "A" <= char <= "Z" else char for char in word )


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

						testmod()



