code: 
  '''simple docstring'''
  from __future__ import annotations
  
  from collections.abc import Iterable, Iterator
  from typing import Any, Generic, TypeVar
  
  lowercase__						=			TypeVar("T", bound=bool)
  
  
  
  
  
  
  class   snake_case__					(			Generic[T]				):
  
  
  
  
  
  
  
  		"""simple docstring"""
  
  		def __init__(			self							: Optional[int]     ,  UpperCamelCase__							: T			)	-> None:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					T     =	value
  				snake_case     :					SkewNode[T] | None     =	None
  				snake_case     :					SkewNode[T] | None     =	None
  
  
  
  		@property
  		def 			lowerCAmelCase							(			self							: Tuple			)	-> T:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				return self._value
  
  
  
  		@staticmethod
  		def 			lowerCAmelCase							(			UpperCamelCase__							: SkewNode[T] | None     ,  UpperCamelCase__							: SkewNode[T] | None			)	-> SkewNode[T] | None:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				if not roota:
  						return roota
  
  				if not roota:
  						return roota
  
  				if roota.value > roota.value:
  						snake_case ,snake_case     :					str     =	roota, roota
  
  				snake_case     :					Optional[Any]     =	roota
  				snake_case     :					Optional[Any]     =	roota.right
  				snake_case     :					Optional[Any]     =	roota.left
  				snake_case     :					List[str]     =	SkewNode.merge(UpperCamelCase__     ,  UpperCamelCase__			)
  
  				return result
  
  
  
  
  
  
  
  class   snake_case__					(			Generic[T]				):
  
  
  
  
  
  
  
  		"""simple docstring"""
  
  		def __init__(			self							: Union[str, Any]     ,  UpperCamelCase__							: Iterable[T] | None = ()			)	-> None:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					SkewNode[T] | None     =	None
  				if data:
  						for item in data:
  								self.insert(UpperCamelCase__			)
  
  
  
  		def __bool__(			self							: Dict			)	-> bool:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				return self._root is not None
  
  
  
  		def __iter__(			self							: Dict			)	-> Iterator[T]:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					list[Any]     =	[]
  				while self:
  						result.append(self.pop()			)
  
  				# Pushing items back to the heap not to clear it.
  				for item in result:
  						self.insert(UpperCamelCase__			)
  
  				return iter(UpperCamelCase__			)
  
  
  
  		def 			lowerCAmelCase							(			self							: Dict     ,  UpperCamelCase__							: T			)	-> None:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					Union[str, Any]     =	SkewNode.merge(self._root     ,  SkewNode(UpperCamelCase__			)			)
  
  
  
  		def 			lowerCAmelCase							(			self							: str			)	-> T | None:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					Tuple     =	self.top()
  				snake_case     :					Optional[Any]     =	(
  				    SkewNode.merge(self._root.left     ,  self._root.right			) if self._root else None
  				)
  
  				return result
  
  
  
  		def 			lowerCAmelCase							(			self							: List[Any]			)	-> T:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				if not self._root:
  						raise IndexError('''Can\'t get top element for the empty heap.'''			)
  				return self._root.value
  
  
  
  		def 			lowerCAmelCase							(			self							: Dict			)	-> None:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					Dict     =	None
  
  
  if __name__ == "__main__":
  						import doctest
  
  						doctest.testmod()
  
  
  
style_context: 
  '''simple docstring'''
  def       _UpperCamelCase	(					)     ->       int:
  
  
  		'''simple docstring'''
  
  
  		for a in range(300 ):
  				for b in range(a + 1   ,					400 ):
  						for c in range(b + 1   ,					500 ):
  								if (a + b + c) == 1000 and (a**2) + (b**2) == (c**2):
  										return a * b * c
  
  		return -1
  
  
  
  
  def       _UpperCamelCase	(					)     ->       int:
  
  
  		'''simple docstring'''
  
  
  		for a in range(300 ):
  				for b in range(400 ):
  						snake_case     :					Dict     =	1000 - a - b
  						if a < b < c and (a**2) + (b**2) == (c**2):
  								return a * b * c
  
  		return -1
  
  
  
  
  def       _UpperCamelCase	(					)     ->       None:
  
  
  		'''simple docstring'''
  
  
  		import timeit
  
  		print(
  		    timeit.timeit('''solution()'''   ,					setup='''from __main__ import solution'''   ,					number=1000 ) )
  		print(
  		    timeit.timeit(
  		        '''solution_fast()'''   ,					setup='''from __main__ import solution_fast'''   ,					number=1000 ) )
  
  
  if __name__ == "__main__":
  						print(f"{solution() = }")
  
  
  