



def 				A      (	_UpperCAmelCase							:  int				,  _UpperCAmelCase							:  Optional[Any]       )							->					Any:







			'''simple docstring'''
			_UpperCAmelCase									=  1
			while b > 0:
						if b & 1:
									res *= a

						a *= a
						b >>= 1

			return res





def 				A      (	_UpperCAmelCase							:  str				,  _UpperCAmelCase							:  int				,  _UpperCAmelCase							:  Dict       )							->					Optional[int]:







			'''simple docstring'''
			_UpperCAmelCase									=  1
			while b > 0:
						if b & 1:
									_UpperCAmelCase									=  ((res % c) * (a % c)) % c

						a *= a
						b >>= 1

			return res





import math





def 				A      (	_UpperCAmelCase							:  int       )							->					int:







			'''simple docstring'''
			return sum(int(_UpperCAmelCase       ) for digit in str(_UpperCAmelCase       )       )





def 				A      (	_UpperCAmelCase							:  int = 30       )							->					int:







			'''simple docstring'''
			_UpperCAmelCase									=  []
			for digit in range(2				,  100       ):
						for power in range(2				,  100       ):
									_UpperCAmelCase									=  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())
