code: 
  
  
  
  from __future__ import annotations
  
  from collections.abc import Iterable, Iterator
  from typing import Any, Generic, TypeVar
  
  __UpperCAmelCase      = TypeVar('''T''', bound=bool)
  
  
  
  class        lowerCAmelCase_	(						Generic[T]							):
         def __init__(    self,    SCREAMING_SNAKE_CASE_ )  ->	None:
            UpperCamelCase					:						T					=			value
            UpperCamelCase					:						SkewNode[T] | None					=			None
            UpperCamelCase					:						SkewNode[T] | None					=			None
         @property
         def       snake_case_ (    self )  ->	T:
            return self._value
  
  
  
  
  
  
         @staticmethod
         def       snake_case_ (    SCREAMING_SNAKE_CASE_,    SCREAMING_SNAKE_CASE_ )  ->	SkewNode[T] | None:
            if not roota:
               return roota
  
            if not roota:
               return roota
  
            if roota.value > roota.value:
               UpperCamelCase			,  UpperCamelCase					:						Optional[int]					=			roota, roota
  
            UpperCamelCase					:						List[str]					=			roota
            UpperCamelCase					:						Dict					=			roota.right
            UpperCamelCase					:						str					=			roota.left
            UpperCamelCase					:						Optional[int]					=			SkewNode.merge(SCREAMING_SNAKE_CASE_,    SCREAMING_SNAKE_CASE_ )
  
            return result
  
  
  
  
  
  
  class        lowerCAmelCase_	(						Generic[T]							):
         def __init__(    self,    SCREAMING_SNAKE_CASE_ = () )  ->	None:
            UpperCamelCase					:						SkewNode[T] | None					=			None
            if data:
               for item in data:
                  self.insert(SCREAMING_SNAKE_CASE_ )
         def __bool__(    self )  ->	bool:
            return self._root is not None
         def __iter__(    self )  ->	Iterator[T]:
            UpperCamelCase					:						list[Any]					=			[]
            while self:
               result.append(self.pop() )
  
            # Pushing items back to the heap not to clear it.
            for item in result:
               self.insert(SCREAMING_SNAKE_CASE_ )
  
            return iter(SCREAMING_SNAKE_CASE_ )
         def       snake_case_ (    self,    SCREAMING_SNAKE_CASE_ )  ->	None:
            UpperCamelCase					:						Optional[int]					=			SkewNode.merge(self._root,    SkewNode(SCREAMING_SNAKE_CASE_ ) )
         def       snake_case_ (    self )  ->	T | None:
            UpperCamelCase					:						Union[str, Any]					=			self.top()
            UpperCamelCase					:						Optional[int]					=			(
                SkewNode.merge(self._root.left,    self._root.right ) if self._root else None
            )
  
            return result
         def       snake_case_ (    self )  ->	T:
            if not self._root:
               raise IndexError('Can\'t get top element for the empty heap.' )
            return self._root.value
  
  
  
  
  
  
         def       snake_case_ (    self )  ->	None:
            UpperCamelCase					:						List[Any]					=			None
  
  
  if __name__ == "__main__":
      import doctest
  
      doctest.testmod()
  
  
  
  
style_context: 
  
  
  
  from __future__ import annotations
  
  import sys
  def 	UpperCamelCase			(     snake_case__ :					int ,  snake_case__ :					int			)			->  tuple[int, int]:
     # base cases
     if abs(snake_case__			) == 1:
        return a, 0
     elif abs(snake_case__			) == 1:
        return 0, b
  
     UpperCamelCase			,  UpperCamelCase					:						Dict					=			a, b
     UpperCamelCase			,  UpperCamelCase					:						int					=			1, 0
     UpperCamelCase			,  UpperCamelCase					:						Union[str, Any]					=			0, 1
  
     while remainder != 0:
        UpperCamelCase					:						str					=			old_remainder // remainder
        UpperCamelCase			,  UpperCamelCase					:						Union[str, Any]					=			remainder, old_remainder - quotient * remainder
        UpperCamelCase			,  UpperCamelCase					:						List[Any]					=			coeff_a, old_coeff_a - quotient * coeff_a
        UpperCamelCase			,  UpperCamelCase					:						Optional[Any]					=			coeff_b, old_coeff_b - quotient * coeff_b
  
     # sign correction for negative numbers
     if a < 0:
        UpperCamelCase					:						Dict					=			-old_coeff_a
     if b < 0:
        UpperCamelCase					:						Any					=			-old_coeff_b
  
     return old_coeff_a, old_coeff_b
  def 	UpperCamelCase			(     )			->  Tuple:
     if len(sys.argv			) < 3:
        print('2 integer arguments required'			)
        return 1
     UpperCamelCase					:						Union[str, Any]					=			int(sys.argv[1]			)
     UpperCamelCase					:						Optional[int]					=			int(sys.argv[2]			)
     print(extended_euclidean_algorithm(snake_case__ ,  snake_case__			)			)
     return 0
  
  
  if __name__ == "__main__":
      raise SystemExit(main())
  
  
  
  