

"""simple docstring"""




__UpperCAmelCase	=			[chr(i) for i in range(32, 126)]
__UpperCAmelCase	=			list(range(len(alphabets)))
__UpperCAmelCase	=			list(range(len(alphabets)))
__UpperCAmelCase	=			list(range(len(alphabets)))
__UpperCAmelCase	=			list(reversed(range(len(alphabets))))
__UpperCAmelCase	=			[]
__UpperCAmelCase	=			__UpperCAmelCase	=			__UpperCAmelCase	=			0
def 					lowerCAmelCase  (   ):
 '''simple docstring'''





 global gear_one_pos
 global gear_two_pos
 global gear_three_pos
 UpperCAmelCase__   :					List[Any]   				=   gear_one[0]
 gear_one.append(__UpperCamelCase )
 del gear_one[0]
 gear_one_pos += 1
 if gear_one_pos % int(len(__UpperCamelCase ) ) == 0:
  UpperCAmelCase__   :					Optional[int]   				=   gear_two[0]
  gear_two.append(__UpperCamelCase )
  del gear_two[0]
  gear_two_pos += 1
  if gear_two_pos % int(len(__UpperCamelCase ) ) == 0:
   UpperCAmelCase__   :					Tuple   				=   gear_three[0]
   gear_three.append(__UpperCamelCase )
   del gear_three[0]
   gear_three_pos += 1
def 					lowerCAmelCase  (   __UpperCamelCase ):
 '''simple docstring'''





 UpperCAmelCase__   :					Union[str, Any]   				=   alphabets.index(__UpperCamelCase )
 UpperCAmelCase__   :					Optional[int]   				=   gear_one[target]
 UpperCAmelCase__   :					List[str]   				=   gear_two[target]
 UpperCAmelCase__   :					Optional[Any]   				=   gear_three[target]
 UpperCAmelCase__   :					Tuple   				=   reflector[target]
 UpperCAmelCase__   :					Dict   				=   gear_three.index(__UpperCamelCase )
 UpperCAmelCase__   :					int   				=   gear_two.index(__UpperCamelCase )
 UpperCAmelCase__   :					Union[str, Any]   				=   gear_one.index(__UpperCamelCase )
 code.append(alphabets[target] )
 rotator()


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





 UpperCAmelCase__   :					Union[str, Any]   				=   1
 UpperCAmelCase__   :					Union[str, Any]   				=   0
 UpperCAmelCase__   :					List[str]   				=   1
 UpperCAmelCase__   :					Any   				=   1
 UpperCAmelCase__   :					Optional[int]   				=   3
 UpperCAmelCase__   :					Any   				=   3
 UpperCAmelCase__   :					Optional[Any]   				=   limit
 UpperCAmelCase__   :					Dict   				=   0

 UpperCAmelCase__   :					int   				=   """"""
 while counter != decimal + 1:
  if 4 * q + r - t < n * t:
   result += str(__UpperCamelCase )
   if counter == 0:
    result += "."

   if decimal == counter:
    break

   counter += 1
   UpperCAmelCase__   :					Union[str, Any]   				=   10 * (r - n * t)
   UpperCAmelCase__   :					int   				=   ((10 * (3 * q + r)) // t) - 10 * n
   q *= 10
   UpperCAmelCase__   :					str   				=   nr
  else:
   UpperCAmelCase__   :					List[str]   				=   (2 * q + r) * l
   UpperCAmelCase__   :					Union[str, Any]   				=   (q * (7 * k) + 2 + (r * l)) // (t * l)
   q *= k
   t *= l
   l += 2
   k += 1
   UpperCAmelCase__   :					Optional[Any]   				=   nn
   UpperCAmelCase__   :					str   				=   nr
 return result
def 					lowerCAmelCase  (   ):
 '''simple docstring'''





 print(F"{calculate_pi(50 ) = }" )
 import doctest

 doctest.testmod()


if __name__ == "__main__":
      main()





