"""simple docstring"""







from .number_theory.prime_numbers import next_prime



class 			_lowerCamelCase      :







				def __init__(			self     :							str      ,       lowerCamelCase_     :							int      ,       lowerCamelCase_     :							int | None = None      ,       lowerCamelCase_     :							float | None = None      ,       ):

					"""simple docstring"""






					_lowercase			:     Optional[int]      					=				size_table
					_lowercase			:     List[Any]      					=				[None] * self.size_table
					_lowercase			:     List[str]      					=				0.75 if lim_charge is None else lim_charge
					_lowercase			:     Optional[int]      					=				1 if charge_factor is None else charge_factor
					_lowercase			:     list      					=				[]
					_lowercase			:     dict      					=				{}







				def 				__UpperCAmelCase       (			self     :							int    ):

					"""simple docstring"""






					return self._keys







				def 				__UpperCAmelCase       (			self     :							Optional[int]    ):

					"""simple docstring"""






					return sum(1 for slot in self.values if slot is not None    ) / (
					    self.size_table * self.charge_factor
					)







				def 				__UpperCAmelCase       (			self     :							Dict      ,       lowerCamelCase_     :							Any    ):

					"""simple docstring"""






					return key % self.size_table







				def 				__UpperCAmelCase       (			self     :							Any      ,       lowerCamelCase_     :							Optional[int]    ):

					"""simple docstring"""






					print(F'''step {step_ord}'''    )
					print(list(range(len(self.values    )    )    )    )
					print(self.values    )







				def 				__UpperCAmelCase       (			self     :							Optional[int]      ,       lowerCamelCase_     :							Tuple    ):

					"""simple docstring"""






					_lowercase			:     List[Any]      					=				1
					_lowercase			:     Optional[int]      					=				values
					for value in values:
						self.insert_data(lowerCamelCase_    )
						self._step_by_step(lowerCamelCase_    )
						i += 1







				def 				__UpperCAmelCase       (			self     :							Union[str, Any]      ,       lowerCamelCase_     :							List[str]      ,       lowerCamelCase_     :							int    ):

					"""simple docstring"""






					_lowercase			:     int      					=				data
					_lowercase			:     Optional[int]      					=				data







				def 				__UpperCAmelCase       (			self     :							List[Any]      ,       lowerCamelCase_     :							Tuple      ,       lowerCamelCase_     :							List[Any]=None    ):

					"""simple docstring"""






					_lowercase			:     Dict      					=				self.hash_function(key + 1    )

					while self.values[new_key] is not None and self.values[new_key] != key:
						if self.values.count(lowerCamelCase_    ) > 0:
							_lowercase			:     Union[str, Any]      					=				self.hash_function(new_key + 1    )
						else:
							_lowercase			:     str      					=				None
							break

					return new_key







				def 				__UpperCAmelCase       (			self     :							List[str]    ):

					"""simple docstring"""






					_lowercase			:     Union[str, Any]      					=				[value for value in self.values if value is not None]
					_lowercase			:     Optional[Any]      					=				next_prime(self.size_table      ,       factor=2    )
					self._keys.clear()
					_lowercase			:     int      					=				[None] * self.size_table  # hell's pointers D: don't DRY ;/
					for value in survivor_values:
						self.insert_data(lowerCamelCase_    )







				def 				__UpperCAmelCase       (			self     :							Dict      ,       lowerCamelCase_     :							Optional[Any]    ):

					"""simple docstring"""






					_lowercase			:     Dict      					=				self.hash_function(lowerCamelCase_    )

					if self.values[key] is None:
						self._set_value(lowerCamelCase_      ,       lowerCamelCase_    )

					elif self.values[key] == data:
						pass

					else:
						_lowercase			:     int      					=				self._collision_resolution(lowerCamelCase_      ,       lowerCamelCase_    )
						if collision_resolution is not None:
							self._set_value(lowerCamelCase_      ,       lowerCamelCase_    )
						else:
							self.rehashing()
							self.insert_data(lowerCamelCase_    )




"""simple docstring"""







def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	if n == 0:
		return 1

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

	else:
		_lowercase			:     Dict      					=				binary_exponentiation(__UpperCAmelCase  ,n / 2      )
		return b * b


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

						SCREAMING_SNAKE_CASE						=    binary_exponentiation(BASE, POWER)
						print(f"""{BASE}^({POWER}) : {RESULT}""")



