



'''simple docstring'''



class        UpperCAmelCase__						:



					def __init__(     self  )  ->      Tuple:
						__lowerCAmelCase       				=	[0]
						__lowerCAmelCase       				=	0



					def 							UpperCAmelCase_			(     self      ,					UpperCamelCase  )  ->      None:
						__lowerCAmelCase       				=	self.__heap[i]
						while i // 2 > 0:
							if self.__heap[i] > self.__heap[i // 2]:
								__lowerCAmelCase       				=	self.__heap[i // 2]
								__lowerCAmelCase       				=	temporary
							i //= 2



					def 							UpperCAmelCase_			(     self      ,					UpperCamelCase  )  ->      None:
						self.__heap.append(UpperCamelCase  )
						self.__size += 1
						self.__swap_up(self.__size  )



					def 							UpperCAmelCase_			(     self      ,					UpperCamelCase  )  ->      None:
						while self.__size >= 2 * i:
							if 2 * i + 1 > self.__size:
								__lowerCAmelCase       				=	2 * i
							else:
								if self.__heap[2 * i] > self.__heap[2 * i + 1]:
									__lowerCAmelCase       				=	2 * i
								else:
									__lowerCAmelCase       				=	2 * i + 1
							__lowerCAmelCase       				=	self.__heap[i]
							if self.__heap[i] < self.__heap[bigger_child]:
								__lowerCAmelCase       				=	self.__heap[bigger_child]
								__lowerCAmelCase       				=	temporary
							__lowerCAmelCase       				=	bigger_child



					def 							UpperCAmelCase_			(     self  )  ->      int:
						__lowerCAmelCase       				=	self.__heap[1]
						__lowerCAmelCase       				=	self.__heap[self.__size]
						self.__size -= 1
						self.__heap.pop()
						self.__swap_down(1  )
						return max_value



					@property
					def 							UpperCAmelCase_			(     self  )  ->      Dict:
						return self.__heap[1:]



					def __len__(     self  )  ->      List[Any]:
						return self.__size


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	# create an instance of BinaryHeap
	lowerCAmelCase						:		Any						      = 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))




'''simple docstring'''



import math



def 	__lowerCAmelCase       (				lowerCamelCase :    int       ):






	'''simple docstring'''




	if not isinstance(lowerCamelCase					,		lowerCamelCase       ):
		__lowerCAmelCase       				=	f'''Input value of [number={number}] must be an integer'''
		raise TypeError(lowerCamelCase       )
	if number < 1:
		__lowerCAmelCase       				=	f'''Input value of [number={number}] must be a positive integer'''
		raise ValueError(lowerCamelCase       )
	__lowerCAmelCase       				=	[number]
	while number != 1:
		if number % 2 == 0:
			__lowerCAmelCase       				=	math.floor(math.sqrt(lowerCamelCase       )       )
		else:
			__lowerCAmelCase       				=	math.floor(
			    math.sqrt(lowerCamelCase       ) * math.sqrt(lowerCamelCase       ) * math.sqrt(lowerCamelCase       )       )
		sequence.append(lowerCamelCase       )
	return sequence


if __name__ == "__main__":
	import doctest

	doctest.testmod()