print [ (i, j, k) for i in (False, True) for j in (False, True) for k in (False, True)]
print [(lambda (p, q) : (not p or q)) ((i, j)) for i in (False, True) for j in (False, True)]
print (lambda (s, w, h) : not ((s or w) and ( not s or h) and (not w or h)) or h) ((False, False, False))
print [(lambda (s, w, h) : not ((s or w) and ( not s or h) and (not w or h)) or h) ((i, j, k)) for i in (False, True) for j in (False, True) for k in (False, True)]