


'''simple docstring'''


import itertools
from pathlib import Path






def 			__lowerCAmelCase			(__lowerCAmelCase ):
		_UpperCAmelCase		:							Optional[Any]             =   [tuple(__lowerCAmelCase ) for login in logins]

		_UpperCAmelCase		:							List[Any]             =   {char for login in split_logins for char in login}

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

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

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






def 			__lowerCAmelCase			(__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'''


import io
import json
import subprocess


lowerCamelCase__     						=  [
    ['en', 'ru'],
    ['ru', 'en'],
    ['en', 'de'],
    ['de', 'en'],
]

lowerCamelCase__     						=  8






def 			__lowerCAmelCase			(__lowerCAmelCase   ,			__lowerCAmelCase ):
		_UpperCAmelCase		:							List[str]             =   {}
		for src, tgt in pairs:
				_UpperCAmelCase		:							Tuple             =   F"""{src}-{tgt}"""
				_UpperCAmelCase		:							Tuple             =   F"""sacrebleu -t wmt19 -l {pair} --echo src""".split()
				_UpperCAmelCase		:							List[Any]             =   subprocess.run(__lowerCAmelCase   ,			stdout=subprocess.PIPE ).stdout.decode("utf-8" ).splitlines()
				_UpperCAmelCase		:							Tuple             =   F"""sacrebleu -t wmt19 -l {pair} --echo ref""".split()
				_UpperCAmelCase		:							List[str]             =   subprocess.run(__lowerCAmelCase   ,			stdout=subprocess.PIPE ).stdout.decode("utf-8" ).splitlines()
				_UpperCAmelCase		:							Tuple             =   {"src": src_lines[:n_objs], "tgt": tgt_lines[:n_objs]}
		return text


lowerCamelCase__     						=  get_all_data(pairs, n_objs)
lowerCamelCase__     						=  './fsmt_val_data.json'
with io.open(filename, 'w', encoding='utf-8') as f:
						lowerCamelCase__     						=  json.dump(text, f, indent=2, ensure_ascii=False)



