
"""simple docstring"""
from __future__ import annotations

import sys
from collections import deque
from typing import Generic, TypeVar

lowerCamelCase_       =		TypeVar("T")






class  _SCREAMING_SNAKE_CASE(       Generic[T]  ):
       SCREAMING_SNAKE_CASE_       :				Tuple     						=  42  # Cache store of keys
       SCREAMING_SNAKE_CASE_       :				Tuple     						=  42  # References of the keys in cache
       SCREAMING_SNAKE_CASE_       :				Dict     						=  10  # Maximum capacity of cache




       def __init__(						self		,SCREAMING_SNAKE_CASE__							)      ->				None:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE       :List[str]		    =  deque()
             __SCREAMING_SNAKE_CASE       :Tuple		    =  set()
             if not n:
                   __SCREAMING_SNAKE_CASE       :Tuple		    =  sys.maxsize
             elif n < 0:
                   raise ValueError('''n should be an integer greater than 0.'''							)
             else:
                   __SCREAMING_SNAKE_CASE       :Dict		    =  n




       def    _UpperCamelCase					(						self		,SCREAMING_SNAKE_CASE__							)      ->				None:





             """simple docstring"""






             if x not in self.key_reference:
                   if len(self.dq_store							) == LRUCache._MAX_CAPACITY:
                         __SCREAMING_SNAKE_CASE       :Tuple		    =  self.dq_store.pop()
                         self.key_reference.remove(__lowerCamelCase							)
             else:
                   self.dq_store.remove(__lowerCamelCase							)

             self.dq_store.appendleft(__lowerCamelCase							)
             self.key_reference.add(__lowerCamelCase							)




       def    _UpperCamelCase					(						self							)      ->				None:





             """simple docstring"""






             for k in self.dq_store:
                   print(__lowerCamelCase							)




       def __repr__(						self							)      ->				str:





             """simple docstring"""






             return f'''LRUCache({self._MAX_CAPACITY}) => {list(self.dq_store							)}'''


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  lowerCamelCase_       =		LRUCache(4)
  lru_cache.refer("A")
  lru_cache.refer(2)
  lru_cache.refer(3)
  lru_cache.refer("A")
  lru_cache.refer(4)
  lru_cache.refer(5)
  lru_cache.display()

  print(lru_cache)
  assert str(lru_cache) == "LRUCache(4) => [5, 4, 'A', 3]"






"""simple docstring"""
def 					__lowerCamelCase       (							a_					:		int			,       a_					:		int							)      ->				int:
      return int((input_a, input_a).count(0							) == 0							)



def 					__lowerCamelCase       (							)      ->				None:
      assert and_gate(0			,       0							) == 0
      assert and_gate(0			,       1							) == 0
      assert and_gate(1			,       0							) == 0
      assert and_gate(1			,       1							) == 1


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