
'''simple docstring'''





from __future__ import annotations

from collections.abc import Iterable, Iterator
from typing import Any, Generic, TypeVar

a__		: Optional[Any]  							=							TypeVar("T", bound=bool)


class 			UpperCamelCase__	(     Generic[T]):






 def __init__(      self	:List[Any]						,					_A	:T      )					->      None:







       '''simple docstring'''



       __A													=      value
       __A													=      None
       __A													=      None






 @property
 def 						lowercase_    (      self	:Tuple      )					->      T:







       '''simple docstring'''



       return self._value






 @staticmethod
 def 						lowercase_    (      _A	:SkewNode[T] | None						,					_A	:SkewNode[T] | None      )					->      SkewNode[T] | None:







       '''simple docstring'''



       if not roota:
             return roota

       if not roota:
             return roota

       if roota.value > roota.value:
             __A						,   __A													=      roota, roota

       __A													=      roota
       __A													=      roota.right
       __A													=      roota.left
       __A													=      SkewNode.merge(_A						,					_A      )

       return result


class 			UpperCamelCase__	(     Generic[T]):






 def __init__(      self	:Optional[int]						,					_A	:Iterable[T] | None = ()      )					->      None:







       '''simple docstring'''



       __A													=      None
       if data:
             for item in data:
                   self.insert(_A      )






 def __bool__(      self	:List[str]      )					->      bool:







       '''simple docstring'''



       return self._root is not None






 def __iter__(      self	:Dict      )					->      Iterator[T]:







       '''simple docstring'''



       __A													=      []
       while self:
             result.append(self.pop()      )

       # Pushing items back to the heap not to clear it.
       for item in result:
             self.insert(_A      )

       return iter(_A      )






 def 						lowercase_    (      self	:Tuple						,					_A	:T      )					->      None:







       '''simple docstring'''



       __A													=      SkewNode.merge(self._root						,					SkewNode(_A      )      )






 def 						lowercase_    (      self	:Dict      )					->      T | None:







       '''simple docstring'''



       __A													=      self.top()
       __A													=      (
           SkewNode.merge(self._root.left						,					self._root.right      ) if self._root else None
       )

       return result






 def 						lowercase_    (      self	:int      )					->      T:







       '''simple docstring'''



       if not self._root:
             raise IndexError('Can\'t get top element for the empty heap.'      )
       return self._root.value






 def 						lowercase_    (      self	:int      )					->      None:







       '''simple docstring'''



       __A													=      None


if __name__ == "__main__":
 import doctest

 doctest.testmod()








'''simple docstring'''
def     UpperCamelCase_  (						__SCREAMING_SNAKE_CASE							):
    """simple docstring"""






    if number != int(__SCREAMING_SNAKE_CASE							):
        raise ValueError("factorial() only accepts integral values"							)
    if number < 0:
        raise ValueError("factorial() not defined for negative values"							)
    snake_case_			:     int        =    1
    for i in range(1,		number + 1							):
        value *= i
    return value

def     UpperCamelCase_  (						__SCREAMING_SNAKE_CASE							):
    """simple docstring"""






    if not isinstance(__SCREAMING_SNAKE_CASE,		__SCREAMING_SNAKE_CASE							):
        raise ValueError("factorial() only accepts integral values"							)
    if n < 0:
        raise ValueError("factorial() not defined for negative values"							)
    return 1 if n == 0 or n == 1 else n * factorial(n - 1							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  a_           =    int(input("Enter a positive integer: ").strip() or 0)
  print(f"""factorial{n} is {factorial(n)}""")




