






"""simple docstring"""


import math



def  lowerCAmelCase    (   __UpperCamelCase			):




  """simple docstring"""







  return sum(int(__UpperCamelCase			) for digit in str(__UpperCamelCase			)			)



def  lowerCAmelCase    (   __UpperCamelCase = 3_0			):




  """simple docstring"""







  __A						      =			[]
  for digit in range(2		,	1_0_0			):
    for power in range(2		,	1_0_0			):
      __A						      =			int(math.pow(__UpperCamelCase		,	__UpperCamelCase			)			)
      if digit == digit_sum(__UpperCamelCase			):
        digit_to_powers.append(__UpperCamelCase			)

  digit_to_powers.sort()
  return digit_to_powers[n - 1]


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












"""simple docstring"""


import itertools
from pathlib import Path



def  lowerCAmelCase    (   __UpperCamelCase			):




  """simple docstring"""







  __A						      =			[tuple(__UpperCamelCase			) for login in logins]

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

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

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

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



def  lowerCAmelCase    (   __UpperCamelCase = "keylog.txt"			):




  """simple docstring"""







  __A						      =			Path(__UpperCamelCase			).parent.joinpath(__UpperCamelCase			).read_text().splitlines()

  return find_secret_passcode(__UpperCamelCase			)


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




