def show_boolean_expression(p, q, expression):
    print str(p) + "\t" + str(q) + "\t" + str(eval(expression))

def show_truth_table(expression):
    print " p       q      " + expression
    length = len(" p       q      " + expression)
    print length * "-"
    
    show_boolean_expression(True, True, expression)
    show_boolean_expression(True, False, expression)
    show_boolean_expression(False, True, expression)
    show_boolean_expression(False, False, expression)
