





class 				_UpperCamelCase       :

       def __init__(		self:			List[str]		)							->			int:




              """simple docstring"""


              UpperCamelCase_ 							=	[0]
              UpperCamelCase_ 							=	0

       def lowercase			(		self:			Optional[int]       , _SCREAMING_SNAKE_CASE:			int		)							->			None:




              """simple docstring"""


              UpperCamelCase_ 							=	self.__heap[i]
              while i // 2 > 0:
                     if self.__heap[i] > self.__heap[i // 2]:
                            UpperCamelCase_ 							=	self.__heap[i // 2]
                            UpperCamelCase_ 							=	temporary
                     i //= 2

       def lowercase			(		self:			List[Any]       , _SCREAMING_SNAKE_CASE:			int		)							->			None:




              """simple docstring"""


              self.__heap.append(_SCREAMING_SNAKE_CASE		)
              self.__size += 1
              self.__swap_up(self.__size		)

       def lowercase			(		self:			List[str]       , _SCREAMING_SNAKE_CASE:			int		)							->			None:




              """simple docstring"""


              while self.__size >= 2 * i:
                     if 2 * i + 1 > self.__size:
                            UpperCamelCase_ 							=	2 * i
                     else:
                            if self.__heap[2 * i] > self.__heap[2 * i + 1]:
                                   UpperCamelCase_ 							=	2 * i
                            else:
                                   UpperCamelCase_ 							=	2 * i + 1
                     UpperCamelCase_ 							=	self.__heap[i]
                     if self.__heap[i] < self.__heap[bigger_child]:
                            UpperCamelCase_ 							=	self.__heap[bigger_child]
                            UpperCamelCase_ 							=	temporary
                     UpperCamelCase_ 							=	bigger_child

       def lowercase			(		self:			Union[str, Any]		)							->			int:




              """simple docstring"""


              UpperCamelCase_ 							=	self.__heap[1]
              UpperCamelCase_ 							=	self.__heap[self.__size]
              self.__size -= 1
              self.__heap.pop()
              self.__swap_down(1		)
              return max_value

       @property
       def lowercase			(		self:			Optional[int]		)							->			int:




              """simple docstring"""


              return self.__heap[1:]



       def __len__(		self:			Any		)							->			Tuple:




              """simple docstring"""


              return self.__size


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     # create an instance of BinaryHeap
     _UpperCAmelCase										=					BinaryHeap()
     binary_heap.insert(6)
     binary_heap.insert(1_0)
     binary_heap.insert(1_5)
     binary_heap.insert(1_2)
     # pop root(max-values because it is max heap)
     print(binary_heap.pop())  # 15
     print(binary_heap.pop())  # 12
     # get the list and size after operations
     print(binary_heap.get_list)
     print(len(binary_heap))







def        lowerCamelCase_     (     SCREAMING_SNAKE_CASE       ,						SCREAMING_SNAKE_CASE ):
			'''simple docstring'''
			if n == 0:
						return 1

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

			else:
						SCREAMING_SNAKE_CASE     =       binary_exponentiation(SCREAMING_SNAKE_CASE       ,						n / 2 )
						return b * b


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

		__A    :				Union[str, Any]    						=	binary_exponentiation(BASE, POWER)
		print(f'''{BASE}^({POWER}) : {RESULT}''')






