
import itertools
from pathlib import Path




def     a						(							snake_case__: List[str] ):


				'''simple docstring'''
				lowercase_					  = [tuple(_lowerCAmelCase ) for login in logins]

				lowercase_					  = {char for login in split_logins for char in login}

				for permutation in itertools.permutations(_lowerCAmelCase ):
								lowercase_					  = True
								for login in logins:
												if not (
												    permutation.index(login[0] )
												    < permutation.index(login[1] )
												    < permutation.index(login[2] )
												):
																lowercase_					  = False
																break

								if satisfied:
												return int(''''''.join(_lowerCAmelCase ) )

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




def     a						(							snake_case__: Optional[int] = "keylog.txt" ):


				'''simple docstring'''
				lowercase_					  = Path(_lowerCAmelCase ).parent.joinpath(_lowerCAmelCase ).read_text().splitlines()

				return find_secret_passcode(_lowerCAmelCase )


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






from __future__ import annotations

__a        = 'Alexander Joslin'




def     a						(							snake_case__: int ):


				'''simple docstring'''

				if number <= 0:
								lowercase_					  = F'''n must be greater than 0. Got n = {number}'''
								raise ValueError(snake_case__ )

				lowercase_					  = [number + 1] * (number + 1)

				# starting position
				lowercase_					  = 0
				for i in range(1						,       snake_case__ ):
								lowercase_					  = min(table[i + 1]						,       table[i] + 1 )
								# check if out of bounds
								if i * 2 <= number:
												lowercase_					  = min(table[i * 2]						,       table[i] + 1 )
								# check if out of bounds
								if i * 3 <= number:
												lowercase_					  = min(table[i * 3]						,       table[i] + 1 )
				return table[number]


if __name__ == "__main__":
						import doctest

						doctest.testmod()




