
"""simple docstring"""





import itertools
from pathlib import Path







def 			__a  (	__lowerCamelCase						):
   UpperCAmelCase_      :      str      =					[tuple(__lowerCamelCase						) for login in logins]

   UpperCAmelCase_      :      Any      =					{char for login in split_logins for char in login}

   for permutation in itertools.permutations(__lowerCamelCase						):
      UpperCAmelCase_      :      Any      =					True
      for login in logins:
         if not (
             permutation.index(login[0]						)
             < permutation.index(login[1]						)
             < permutation.index(login[2]						)
         ):
            UpperCAmelCase_      :      Union[str, Any]      =					False
            break

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

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







def 			__a  (	__lowerCamelCase = "keylog.txt"						):
   UpperCAmelCase_      :      Any      =					Path(__lowerCamelCase						).parent.joinpath(__lowerCamelCase						).read_text().splitlines()

   return find_secret_passcode(__lowerCamelCase						)


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




"""simple docstring"""





def 			__a  (	__lowerCamelCase = 1000						):
   UpperCAmelCase_      :      List[Any]      =					0
   UpperCAmelCase_      :      List[str]      =					(n - 1) // 3
   total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
   UpperCAmelCase_      :      Any      =					(n - 1) // 5
   total += ((terms) * (10 + (terms - 1) * 5)) // 2
   UpperCAmelCase_      :      Optional[int]      =					(n - 1) // 15
   total -= ((terms) * (30 + (terms - 1) * 15)) // 2
   return total


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


