


'''simple docstring'''



from __future__ import annotations

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

_lowercase      :      Optional[int]            =					TypeVar("""T""")






class 	UpperCamelCase__(       Generic[T]	):




				def __init__(		self      :			Any				,   lowerCAmelCase      :			T				)->					str:

										"""simple docstring"""




										UpperCAmelCase					    =     data
										UpperCAmelCase					    =     None





				def __str__(		self      :			Optional[int]				)->					str:

										"""simple docstring"""




										return F"""{self.data}"""







class 	UpperCamelCase__(       Generic[T]	):




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

										"""simple docstring"""




										UpperCAmelCase					    =     None




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

										"""simple docstring"""




										UpperCAmelCase					    =     self.top
										while node:
																yield node.data
																UpperCAmelCase					    =     node.next




				def __str__(		self      :			Optional[Any]				)->					str:

										"""simple docstring"""




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




				def __len__(		self      :			List[Any]				)->					int:

										"""simple docstring"""




										return len(tuple(iter(self				)				)				)




				def 					a__(		self      :			int				)->					bool:

										"""simple docstring"""




										return self.top is None




				def 					a__(		self      :			List[Any]				,   lowerCAmelCase      :			T				)->					None:

										"""simple docstring"""




										UpperCAmelCase					    =     Node(lowerCAmelCase				)
										if not self.is_empty():
																UpperCAmelCase					    =     self.top
										UpperCAmelCase					    =     node




				def 					a__(		self      :			List[str]				)->					T:

										"""simple docstring"""




										if self.is_empty():
																raise IndexError('''pop from empty stack'''				)
										assert isinstance(self.top				,   lowerCAmelCase				)
										UpperCAmelCase					    =     self.top
										UpperCAmelCase					    =     self.top.next
										return pop_node.data




				def 					a__(		self      :			Tuple				)->					T:

										"""simple docstring"""




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

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





				def 					a__(		self      :			str				)->					None:

										"""simple docstring"""




										UpperCAmelCase					    =     None


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

	testmod()









'''simple docstring'''



def 				lowerCamelCase__				(	A       :      int				,       A       :      int					):




						'''simple docstring'''






						return int(input_a == input_a == 0					)


def 				lowerCamelCase__				(	):




						'''simple docstring'''






						print('''Truth Table of NOR Gate:'''					)
						print('''|   Input 1   |  Input 2  | Output |'''					)
						print(f"""|      0      |    0      |  {nor_gate(0				,       0					)}     |"""					)
						print(f"""|      0      |    1      |  {nor_gate(0				,       1					)}     |"""					)
						print(f"""|      1      |    0      |  {nor_gate(1				,       0					)}     |"""					)
						print(f"""|      1      |    1      |  {nor_gate(1				,       1					)}     |"""					)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()





