



import sys

sys.set_int_max_str_digits(0)  # type: ignore
def      A      (			_A							):




					"""simple docstring"""
					snake_case_						:Optional[Any]								=						[0] * 11
					snake_case_						:Any								=						[0] * 11

					# mark last 9 numbers
					for _ in range(9							):
										snake_case_						:Tuple								=						1
										snake_case_						:List[str]								=						number // 10
					# flag
					snake_case_						:Any								=						True

					# check last 9 numbers for pandigitality

					for x in range(9							):
										if not check_last[x + 1]:
															snake_case_						:Dict								=						False
					if not f:
										return f

					# mark first 9 numbers
					snake_case_						:Union[str, Any]								=						int(str(_A							)[:9]							)

					for _ in range(9							):
										snake_case_						:Optional[Any]								=						1
										snake_case_						:Any								=						number // 10

					# check first 9 numbers for pandigitality

					for x in range(9							):
										if not check_front[x + 1]:
															snake_case_						:List[Any]								=						False
					return f
def      A      (			_A							):




					"""simple docstring"""
					snake_case_						:Optional[Any]								=						[0] * 11

					# mark last 9 numbers
					for _ in range(9							):
										snake_case_						:str								=						1
										snake_case_						:Dict								=						number // 10
					# flag
					snake_case_						:List[Any]								=						True

					# check last 9 numbers for pandigitality

					for x in range(9							):
										if not check_last[x + 1]:
															snake_case_						:Optional[int]								=						False
					return f
def      A      (			):




					"""simple docstring"""
					snake_case_						:Tuple								=						1
					snake_case_						:Dict								=						1
					snake_case_						:List[str]								=						2
					# temporary Fibonacci numbers

					snake_case_						:Union[str, Any]								=						1
					snake_case_						:Tuple								=						1
					snake_case_						:List[Any]								=						2
					# temporary Fibonacci numbers mod 1e9

					# mod m=1e9, done for fast optimisation
					snake_case_						:List[str]								=						[0] * 1_000_000
					snake_case_						:Optional[int]								=						1_000_000_000

					for x in range(1_000_000							):
										snake_case_						:Optional[Any]								=						(aa + ba) % m
										snake_case_						:Tuple								=						ba % m
										snake_case_						:Dict								=						ca % m
										if checka(_A							):
															snake_case_						:Tuple								=						1

					for x in range(1_000_000							):
										snake_case_						:Any								=						a + b
										snake_case_						:List[str]								=						b
										snake_case_						:List[str]								=						c
										# perform check only if in tocheck
										if tocheck[x + 3] and check(_A							):
															return x + 3  # first 2 already done
					return -1


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






"""simple docstring"""






def      A      (			_A,     _A							):




					"""simple docstring"""
					if n == 0:
										return 1

					elif n % 2 == 1:
										return binary_exponentiation(_A,     n - 1							) * a

					else:
										snake_case_						:Optional[int]								=						binary_exponentiation(_A,     n / 2							)
										return b * b


if __name__ == "__main__":
				try:
								__UpperCAmelCase      :      str   					=					int(input('Enter Base : ').strip())
								__UpperCAmelCase      :      Any   					=					int(input('Enter Power : ').strip())
				except ValueError:
								print('Invalid literal for integer')

				__UpperCAmelCase      :      Optional[int]   					=					binary_exponentiation(BASE, POWER)
				print(F'''{BASE}^({POWER}) : {RESULT}''')

