def printer(x,y):
g=not(x and not y) or not(x or not(y or x))
print(f"{x}\t{y}\t{g}")
X=True
Y=True
a=0
print("X\tY\tF")
while a<4:
if a==0:
printer(X,Y)
elif a==1 or a==3:
Y=False
elif a==2:
X,Y=Y,X
else:
break
a+=1
def printer(x,y):
g=not(x and not y) or not(x or not(y or x))
print(f"{x}\t{y}\t{g}")
X=True
Y=True
a=0
print("X\tY\tF")
while a<4:
if a==0:
printer(X,Y)
elif a==1 or a==3:
Y=False
printer(X,Y)
elif a==2:
X,Y=Y,X
printer(X,Y)
else:
break
a+=1