After looking at your question, I reasoned you were writing this in python. Here's my code, I hope it helps!
while True:
v1 = input("Enter value of first variable (T/F) ")
v2 = input("Enter value of second variable (T/F) ")
v3 = input("Enter value of third variable (T/F) ")
print("v1: {}, v2: {}, v3: {} = T".format(v1, v2, v3) if v1 == "T" and v2 == "T" or v1 == "T" and v3 == "T" else "v1: {}, v2: {}, v3: {} = F".format(v1, v2, v3))