

from __future__ import annotations

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

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







class        a__       (   Generic[T]       ):







  """simple docstring"""




  def __init__(			self    : Union[str, Any]				,				UpperCAmelCase__    : Any		)					->Dict:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Any       =   data
        SCREAMING_SNAKE_CASE :      Tuple       =   None




  def __str__(			self    : List[Any]		)					->str:
        """simple docstring"""







        return f"{self.data}"







class        a__       (   Generic[T]       ):







  """simple docstring"""




  def __init__(			self    : Optional[Any]		)					->None:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Any       =   None


  def __iter__(			self    : Union[str, Any]		)					->Iterator[T]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Optional[Any]       =   self.top
        while node:
              yield node.data
              SCREAMING_SNAKE_CASE :      List[str]       =   node.next


  def __str__(			self    : Dict		)					->str:
        """simple docstring"""







        return "->".join([str(A_		) for item in self]		)


  def __len__(			self    : Optional[int]		)					->int:
        """simple docstring"""







        return len(tuple(iter(self		)		)		)


  def  _lowercase      (			self    : Optional[Any]		)					->bool:
        """simple docstring"""







        return self.top is None


  def  _lowercase      (			self    : Optional[int]				,				UpperCAmelCase__    : Union[str, Any]		)					->None:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Union[str, Any]       =   Node(A_		)
        if not self.is_empty():
              SCREAMING_SNAKE_CASE :      Optional[Any]       =   self.top
        SCREAMING_SNAKE_CASE :      List[str]       =   node


  def  _lowercase      (			self    : List[str]		)					->T:
        """simple docstring"""







        if self.is_empty():
              raise IndexError("""pop from empty stack"""		)
        assert isinstance(self.top				,				A_		)
        SCREAMING_SNAKE_CASE :      int       =   self.top
        SCREAMING_SNAKE_CASE :      Tuple       =   self.top.next
        return pop_node.data


  def  _lowercase      (			self    : List[Any]		)					->T:
        """simple docstring"""







        if self.is_empty():
              raise IndexError("""peek from empty stack"""		)

        assert self.top is not None
        return self.top.data




  def  _lowercase      (			self    : Optional[int]		)					->None:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      int       =   None


if __name__ == "__main__":
  from doctest import testmod

  testmod()





def 					__lowercase      (     _A						,    _A			)     ->						int:
      return int((input_a, input_a).count(1			) != 0			)






def 					__lowercase      (     )     ->						None:
      assert or_gate(0						,    0			) == 0
      assert or_gate(0						,    1			) == 1
      assert or_gate(1						,    0			) == 1
      assert or_gate(1						,    1			) == 1


if __name__ == "__main__":
  print(or_gate(0, 1))
  print(or_gate(1, 0))
  print(or_gate(0, 0))
  print(or_gate(1, 1))




