






"""simple docstring"""


def 			snake_case  (A_      :List[Any]	,			A_      :List[str]	,			A_      :List[str]      ):







  '''simple docstring'''

  assert b != 0, "This cannot accept modulo that is == 0"
  if n == 0:
    return 1

  if n % 2 == 1:
    return (bin_exp_mod(A_	,			n - 1	,			A_      ) * a) % b

  a     :			int				=   bin_exp_mod(A_	,			n / 2	,			A_      )
  return (r * r) % b


if __name__ == "__main__":
   try:
      _UpperCamelCase				:    List[Any]     =						int(input('Enter Base : ').strip())
      _UpperCamelCase				:    Optional[Any]     =						int(input('Enter Power : ').strip())
      _UpperCamelCase				:    Optional[int]     =						int(input('Enter Modulo : ').strip())
   except ValueError:
      print('Invalid literal for integer')

   print(bin_exp_mod(BASE, POWER, MODULO))











"""simple docstring"""




def        a_				(							_lowercase = 10**6   ):

						if n <= 0:
												raise ValueError('''Please enter an integer greater than 0'''   )

						_UpperCamelCase			:					Any     =    list(range(n + 1   )   )
						for number in range(2       ,						n + 1   ):
												if phi[number] == number:
																		phi[number] -= 1
																		for multiple in range(number * 2       ,						n + 1       ,						_lowercase   ):
																								_UpperCamelCase			:					List[str]     =    (phi[multiple] // number) * (number - 1)

						_UpperCamelCase			:					Union[str, Any]     =    1
						for number in range(1       ,						n + 1   ):
												if (answer / phi[answer]) < (number / phi[number]):
																		_UpperCamelCase			:					List[str]     =    number

						return answer


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



