





import math


def 					__SCREAMING_SNAKE_CASE  (							__lowercase:		int):



  '''simple docstring'''






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


def 					__SCREAMING_SNAKE_CASE  (							__lowercase:		int = 30):



  '''simple docstring'''






  __lowerCAmelCase			=				[]
  for digit in range(2     ,							1_00):
    for power in range(2     ,							1_00):
      __lowerCAmelCase			=				int(math.pow(__lowercase     ,							__lowercase))
      if digit == digit_sum(__lowercase):
        digit_to_powers.append(__lowercase)

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


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











def 					__SCREAMING_SNAKE_CASE  (							__lowercase:		list):



  '''simple docstring'''






  if len(__lowercase) <= 1:
    return data
  else:
    return [
        *quick_sort([e for e in data[1:] if e <= data[0]]),
        data[0],
        *quick_sort([e for e in data[1:] if e > data[0]]),
    ]


if __name__ == "__main__":
      import doctest

      doctest.testmod()
