def test_Nand():
    (A, B, C) = list(map(Boolean, symbols('A,B,C')))
    assert (Nand() == False)
    assert (Nand(A) == (~ A))
    assert (Nand(True) == False)
    assert (Nand(False) == True)
    assert (Nand(True, True) == False)
    assert (Nand(True, False) == True)
    assert (Nand(False, False) == True)
    assert (Nand(True, A) == (~ A))
    assert (Nand(False, A) == True)
    assert (Nand(True, True, True) == False)
    assert (Nand(True, True, A) == (~ A))
    assert (Nand(True, False, A) == True)
def test_Nand():
    (A, B, C) = list(map(Boolean, symbols('A,B,C')))
    assert (Nand() == False)
    assert (Nand(A) == (~ A))
    assert (Nand(True) == False)
    assert (Nand(False) == True)
    assert (Nand(True, True) == False)
    assert (Nand(True, False) == True)
    assert (Nand(False, False) == True)
    assert (Nand(True, A) == (~ A))
    assert (Nand(False, A) == True)
    assert (Nand(True, True, True) == False)
    assert (Nand(True, True, A) == (~ A))
    assert (Nand(True, False, A) == True)