"""simple docstring"""







from collections import OrderedDict
from dataclasses import fields
from typing import Any, Tuple

import numpy as np

from .import_utils import is_torch_available


def   __lowerCAmelCase(		__UpperCAmelCase      ):






	"""simple docstring"""





	if is_torch_available():
		import torch

		if isinstance(__UpperCAmelCase  ,torch.Tensor      ):
			return True

	return isinstance(__UpperCAmelCase  ,np.ndarray      )







class 			_lowerCamelCase      (__lowerCamelCase  ):







				def 				__UpperCAmelCase       (			self     :							List[Any]    ):

					"""simple docstring"""






					_lowercase			:     List[Any]      					=				fields(self    )

					# Safety and consistency checks
					if not len(lowerCamelCase_    ):
						raise ValueError(F'''{self.__class__.__name__} has no fields.'''    )

					_lowercase			:     Tuple      					=				getattr(self      ,       class_fields[0].name    )
					_lowercase			:     Tuple      					=				all(getattr(self      ,       field.name    ) is None for field in class_fields[1:]    )

					if other_fields_are_none and isinstance(lowerCamelCase_      ,       lowerCamelCase_    ):
						for key, value in first_field.items():
							_lowercase			:     Dict      					=				value
					else:
						for field in class_fields:
							_lowercase			:     List[Any]      					=				getattr(self      ,       field.name    )
							if v is not None:
								_lowercase			:     List[Any]      					=				v







				def __delitem__(			self     :							int      ,       *lowerCamelCase_     :							List[str]      ,       **lowerCamelCase_     :							int    ):

					"""simple docstring"""






					raise Exception(F'''You cannot use ``__delitem__`` on a {self.__class__.__name__} instance.'''    )







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

					"""simple docstring"""






					raise Exception(F'''You cannot use ``setdefault`` on a {self.__class__.__name__} instance.'''    )







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

					"""simple docstring"""






					raise Exception(F'''You cannot use ``pop`` on a {self.__class__.__name__} instance.'''    )







				def 				__UpperCAmelCase       (			self     :							Dict      ,       *lowerCamelCase_     :							List[Any]      ,       **lowerCamelCase_     :							List[str]    ):

					"""simple docstring"""






					raise Exception(F'''You cannot use ``update`` on a {self.__class__.__name__} instance.'''    )







				def __getitem__(			self     :							Optional[int]      ,       lowerCamelCase_     :							Optional[int]    ):

					"""simple docstring"""






					if isinstance(lowerCamelCase_      ,       lowerCamelCase_    ):
						_lowercase			:     Tuple      					=				dict(self.items()    )
						return inner_dict[k]
					else:
						return self.to_tuple()[k]







				def __setattr__(			self     :							List[str]      ,       lowerCamelCase_     :							List[str]      ,       lowerCamelCase_     :							Any    ):

					"""simple docstring"""






					if name in self.keys() and value is not None:
						# Don't call self.__setitem__ to avoid recursion errors
						super().__setitem__(lowerCamelCase_      ,       lowerCamelCase_    )
					super().__setattr__(lowerCamelCase_      ,       lowerCamelCase_    )







				def __setitem__(			self     :							Optional[Any]      ,       lowerCamelCase_     :							List[str]      ,       lowerCamelCase_     :							Tuple    ):

					"""simple docstring"""






					super().__setitem__(lowerCamelCase_      ,       lowerCamelCase_    )
					# Don't call self.__setattr__ to avoid recursion errors
					super().__setattr__(lowerCamelCase_      ,       lowerCamelCase_    )







				def 				__UpperCAmelCase       (			self     :							List[str]    ):

					"""simple docstring"""






					return tuple(self[k] for k in self.keys()    )




"""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}""")



