





_UpperCAmelCase				       = [chr(i) for i in range(3_2, 1_2_6)]
_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_       (							)   ->						List[Any]:
       global gear_one_pos
       global gear_two_pos
       global gear_three_pos
       UpperCamelCase_      				=     gear_one[0]
       gear_one.append(UpperCamelCase_     )
       del gear_one[0]
       gear_one_pos += 1
       if gear_one_pos % int(len(UpperCamelCase_     )     ) == 0:
              UpperCamelCase_      				=     gear_two[0]
              gear_two.append(UpperCamelCase_     )
              del gear_two[0]
              gear_two_pos += 1
              if gear_two_pos % int(len(UpperCamelCase_     )     ) == 0:
                     UpperCamelCase_      				=     gear_three[0]
                     gear_three.append(UpperCamelCase_     )
                     del gear_three[0]
                     gear_three_pos += 1




def        lowerCAmelCase_       (							UpperCamelCase_     )   ->						Optional[Any]:
       UpperCamelCase_      				=     alphabets.index(UpperCamelCase_     )
       UpperCamelCase_      				=     gear_one[target]
       UpperCamelCase_      				=     gear_two[target]
       UpperCamelCase_      				=     gear_three[target]
       UpperCamelCase_      				=     reflector[target]
       UpperCamelCase_      				=     gear_three.index(UpperCamelCase_     )
       UpperCamelCase_      				=     gear_two.index(UpperCamelCase_     )
       UpperCamelCase_      				=     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!'
     )








def        lowerCAmelCase_       (							UpperCamelCase_    ,						UpperCamelCase_     )   ->						list:
       UpperCamelCase_      				=     sorted(UpperCamelCase_    ,						key=lambda UpperCamelCase_     : value[2]    ,						reverse=UpperCamelCase_     )

       # Create a list of size equal to the maximum deadline
       # and initialize it with -1
       UpperCamelCase_      				=     max(UpperCamelCase_    ,						key=lambda UpperCamelCase_     : value[1]     )[1]
       UpperCamelCase_      				=     [-1] * max_deadline

       # Finding the maximum profit and the count of jobs
       UpperCamelCase_      				=     0
       UpperCamelCase_      				=     0
       for job in jobs:
              # Find a free time slot for this job
              # (Note that we start from the last possible slot)
              for i in range(job[1] - 1    ,						-1    ,						-1     ):
                     if time_slots[i] == -1:
                            UpperCamelCase_      				=     job[0]
                            count += 1
                            max_profit += job[2]
                            break
       return [count, max_profit]


if __name__ == "__main__":
     import doctest

     doctest.testmod()

