


'''simple docstring'''




from __future__ import annotations

from typing import Generic, TypeVar

_a      :      Union[str, Any]       				=      TypeVar("T")




class  _lowercase   (  __lowercase       ):
   pass




class  _lowercase   (  __lowercase       ):
   pass




class  _lowercase   (  Generic[T]       ):
   def __init__(	self					:			List[str]					,      SCREAMING_SNAKE_CASE_					:			int = 10			)   ->       Tuple:
        __snake_case    			=	[]
        __snake_case    			=	limit
   def __bool__(	self					:			Optional[int]			)   ->       bool:
        return bool(self.stack			)
   def __str__(	self					:			List[Any]			)   ->       str:
        return str(self.stack			)
   def a     (	self					:			str					,      SCREAMING_SNAKE_CASE_					:			T			)   ->       None:
        if len(self.stack			) >= self.limit:
             raise StackOverflowError
        self.stack.append(SCREAMING_SNAKE_CASE_			)
   def a     (	self					:			List[str]			)   ->       T:
        if not self.stack:
             raise StackUnderflowError
        return self.stack.pop()
   def a     (	self					:			Dict			)   ->       T:
        if not self.stack:
             raise StackUnderflowError
        return self.stack[-1]
   def a     (	self					:			Tuple			)   ->       bool:
        return not bool(self.stack			)
   def a     (	self					:			Tuple			)   ->       bool:
        return self.size() == self.limit
   def a     (	self					:			Optional[int]			)   ->       int:
        return len(self.stack			)





   def __contains__(	self					:			str					,      SCREAMING_SNAKE_CASE_					:			T			)   ->       bool:
        return item in self.stack





def      _a		() -> None:






     """simple docstring"""
     __snake_case    			=	Stack(1_0	)
     assert bool(lowercase__	) is False
     assert stack.is_empty() is True
     assert stack.is_full() is False
     assert str(lowercase__	) == "[]"

     try:
          __snake_case    			=	stack.pop()
          raise AssertionError  # This should not happen
     except StackUnderflowError:
          assert True  # This should happen

     try:
          __snake_case    			=	stack.peek()
          raise AssertionError  # This should not happen
     except StackUnderflowError:
          assert True  # This should happen

     for i in range(1_0	):
          assert stack.size() == i
          stack.push(lowercase__	)

     assert bool(lowercase__	)
     assert not stack.is_empty()
     assert stack.is_full()
     assert str(lowercase__	) == str(list(range(1_0	)	)	)
     assert stack.pop() == 9
     assert stack.peek() == 8

     stack.push(1_0_0	)
     assert str(lowercase__	) == str([0, 1, 2, 3, 4, 5, 6, 7, 8, 1_0_0]	)

     try:
          stack.push(2_0_0	)
          raise AssertionError  # This should not happen
     except StackOverflowError:
          assert True  # This should happen

     assert not stack.is_empty()
     assert stack.size() == 1_0

     assert 5 in stack
     assert 5_5 not in stack


if __name__ == "__main__":
       test_stack()








'''simple docstring'''




def      _a		(lowercase__ :      int	) -> int:






     """simple docstring"""
     return 1 if input_a == 0 else 0





def      _a		() -> None:






     """simple docstring"""
     assert not_gate(0	) == 1
     assert not_gate(1	) == 0


if __name__ == "__main__":
       print(not_gate(0))
       print(not_gate(1))




