


import itertools
from pathlib import Path







def 	A (		A__			):
     UpperCAmelCase    :					Any			=      [tuple(lowerCamelCase_			) for login in logins]

     UpperCAmelCase    :					List[str]			=      {char for login in split_logins for char in login}

     for permutation in itertools.permutations(lowerCamelCase_			):
          UpperCAmelCase    :					Optional[Any]			=      True
          for login in logins:
               if not (
                   permutation.index(login[0]			)
                   < permutation.index(login[1]			)
                   < permutation.index(login[2]			)
               ):
                    UpperCAmelCase    :					List[str]			=      False
                    break

          if satisfied:
               return int("".join(lowerCamelCase_			)			)

     raise Exception("Unable to find the secret passcode"			)







def 	A (		A__ = "keylog.txt"			):
     UpperCAmelCase    :					Optional[Any]			=      Path(lowerCamelCase_			).parent.joinpath(lowerCamelCase_			).read_text().splitlines()

     return find_secret_passcode(lowerCamelCase_			)


if __name__ == "__main__":
      print(f'''{solution() = }''')




'''simple docstring'''


def    _lowerCamelCase       ( lowerCamelCase_   :				list  ):



     """simple docstring"""





     UpperCAmelCase_				:  Optional[int]  = len(lowerCamelCase_  )

     # Set the gap value to be decreased by a factor of 1.3
     # after each iteration
     UpperCAmelCase_				:  Optional[Any]  = 1.3

     # Continue sorting until the gap is 1
     while gap > 1:
          # Decrease the gap value
          UpperCAmelCase_				:  Optional[Any]  = int(gap / shrink  )

          # Sort the elements using insertion sort
          for i in range(lowerCamelCase_      ,	len(lowerCamelCase_  )  ):
               UpperCAmelCase_				:  Optional[int]  = collection[i]
               UpperCAmelCase_				:  Tuple  = i
               while j >= gap and collection[j - gap] > temp:
                    UpperCAmelCase_				:  Tuple  = collection[j - gap]
                    j -= gap
               UpperCAmelCase_				:  Optional[int]  = temp

     return collection


if __name__ == "__main__":
 import doctest

 doctest.testmod()






