


'''simple docstring'''

import os





def lowerCamelCase    (    ):





	"""simple docstring"""







	__magic_name__ :					Union[str, Any]  			=  os.path.dirname(os.path.realpath(lowerCAmelCase	)	)
	__magic_name__ :					List[Any]  			=  os.path.join(lowerCAmelCase	,	'triangle.txt'	)

	with open(lowerCAmelCase	) as in_file:
		__magic_name__ :					List[str]  			=  [[int(lowerCAmelCase	) for i in line.split()] for line in in_file]

	while len(lowerCAmelCase	) != 1:
		__magic_name__ :					str  			=  triangle.pop()
		__magic_name__ :					List[str]  			=  triangle[-1]
		for j in range(len(lowerCAmelCase	) - 1	):
			curr_row[j] += max(last_row[j]	,	last_row[j + 1]	)
	return triangle[0][0]


if __name__ == "__main__":
							print(solution())



'''simple docstring'''

import itertools
from pathlib import Path





def lowerCamelCase    (    lowerCAmelCase       :			list[str]	):





	"""simple docstring"""







	__magic_name__ :					str  			=  [tuple(lowerCAmelCase	) for login in logins]

	__magic_name__ :					int  			=  {char for login in split_logins for char in login}

	for permutation in itertools.permutations(lowerCAmelCase	):
		__magic_name__ :					List[Any]  			=  True
		for login in logins:
			if not (
			    permutation.index(login[0]	)
			    < permutation.index(login[1]	)
			    < permutation.index(login[2]	)
			):
				__magic_name__ :					Tuple  			=  False
				break

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

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





def lowerCamelCase    (    lowerCAmelCase       :			str = "keylog.txt"	):





	"""simple docstring"""







	__magic_name__ :					List[Any]  			=  Path(lowerCAmelCase	).parent.joinpath(lowerCAmelCase	).read_text().splitlines()

	return find_secret_passcode(lowerCAmelCase	)


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