//Pascal
var A, B, C: boolean;
begin
writeln('A':5, 'B':5, 'C':5,'A&B':6, '⌐A':4, '⌐A&C':6,'F':4);
for A := false to true do
for B := false to true do
for C := false to true do
writeln(ord(A):5, ord(B):5, ord(C):5,ord((A and B)):5, ord(not(A)):5,
ord((not(A)and C)):5,ord((not(A and B)or(not(A) and C))):5);
end.