





from __future__ import annotations

def    A_  (							a					,   a  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_				:  list[list[int]]           =     []
      create_all_state(1					,   a					,   a					,   []					,   a  )
      return result

def    A_  (							a					,   a					,   a					,   a					,   a					,   ):

      """simple docstring"""



      if level == 0:
            total_list.append(current_list[:]  )
            return

      for i in range(a					,   total_number - level + 2  ):
            current_list.append(a  )
            create_all_state(i + 1					,   a					,   level - 1					,   a					,   a  )
            current_list.pop()

def    A_  (							a  ):

      """simple docstring"""



      for i in total_list:
            print(*a  )


if __name__ == "__main__":
    lowerCAmelCase     :   Tuple						     =  4
    lowerCAmelCase     :   Union[str, Any]						     =  2
    lowerCAmelCase     :   Union[str, Any]						     =  generate_all_combinations(n, k)
    print_all_state(total_list)









def    A_  (							a					,   a  ):

      """simple docstring"""



      return int((input_a, input_a).count(0  ) != 0  )

def    A_  (							):

      """simple docstring"""



      assert nand_gate(0					,   0  ) == 1
      assert nand_gate(0					,   1  ) == 1
      assert nand_gate(1					,   0  ) == 1
      assert nand_gate(1					,   1  ) == 0


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






