
"""simple docstring"""





_a									=				[chr(i) for i in range(32, 126)]
_a									=				list(range(len(alphabets)))
_a									=				list(range(len(alphabets)))
_a									=				list(range(len(alphabets)))
_a									=				list(reversed(range(len(alphabets))))
_a									=				[]
_a									=				_a									=				_a									=				0







def       __a	(						):
   global gear_one_pos
   global gear_two_pos
   global gear_three_pos
   UpperCAmelCase_   :   Union[str, Any]     	=       gear_one[0]
   gear_one.append(a__    )
   del gear_one[0]
   gear_one_pos += 1
   if gear_one_pos % int(len(a__    )    ) == 0:
      UpperCAmelCase_   :   Any     	=       gear_two[0]
      gear_two.append(a__    )
      del gear_two[0]
      gear_two_pos += 1
      if gear_two_pos % int(len(a__    )    ) == 0:
         UpperCAmelCase_   :   Tuple     	=       gear_three[0]
         gear_three.append(a__    )
         del gear_three[0]
         gear_three_pos += 1







def       __a	(						__lowerCamelCase    ):
   UpperCAmelCase_   :   Union[str, Any]     	=       alphabets.index(a__    )
   UpperCAmelCase_   :   Tuple     	=       gear_one[target]
   UpperCAmelCase_   :   Any     	=       gear_two[target]
   UpperCAmelCase_   :   List[str]     	=       gear_three[target]
   UpperCAmelCase_   :   Any     	=       reflector[target]
   UpperCAmelCase_   :   Union[str, Any]     	=       gear_three.index(a__    )
   UpperCAmelCase_   :   Union[str, Any]     	=       gear_two.index(a__    )
   UpperCAmelCase_   :   Any     	=       gear_one.index(a__    )
   code.append(alphabets[target]    )
   rotator()


if __name__ == "__main__":
    _a									=				list(input('Type your message:\n'))
    while True:
        try:
            _a									=				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!'
    )




_A							=       [chr(i) for i in range(32, 126)]
_A							=       list(range(len(alphabets)))
_A							=       list(range(len(alphabets)))
_A							=       list(range(len(alphabets)))
_A							=       list(reversed(range(len(alphabets))))
_A							=       []
_A							=       _A							=       _A							=       0




def 					lowerCamelCase__					(    )		->						List[str]:
       global gear_one_pos
       global gear_two_pos
       global gear_three_pos
       UpperCamelCase_											=							gear_one[0]
       gear_one.append(a__  )
       del gear_one[0]
       gear_one_pos += 1
       if gear_one_pos % int(len(a__  )  ) == 0:
              UpperCamelCase_											=							gear_two[0]
              gear_two.append(a__  )
              del gear_two[0]
              gear_two_pos += 1
              if gear_two_pos % int(len(a__  )  ) == 0:
                     UpperCamelCase_											=							gear_three[0]
                     gear_three.append(a__  )
                     del gear_three[0]
                     gear_three_pos += 1




def 					lowerCamelCase__					(    a__	:	Optional[int]  )		->						Any:
       UpperCamelCase_											=							alphabets.index(a__  )
       UpperCamelCase_											=							gear_one[target]
       UpperCamelCase_											=							gear_two[target]
       UpperCamelCase_											=							gear_three[target]
       UpperCamelCase_											=							reflector[target]
       UpperCamelCase_											=							gear_three.index(a__  )
       UpperCamelCase_											=							gear_two.index(a__  )
       UpperCamelCase_											=							gear_one.index(a__  )
       code.append(alphabets[target]  )
       rotator()


if __name__ == "__main__":
      _A							=       list(input('''Type your message:\n'''))
      while True:
            try:
                  _A							=       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!'''
      )



