var A,B,C:boolean;
function f(C,B,A:boolean):boolean;
begin
f:=((A and C) and(not B))and(B or A);
end;
writeln('C':7,'B':7,'A':7,'F':7);
for C:=false to true do
for B:=false to true do
for A:=false to true do
writeln(C:7,B:7,A:7,f(C,B,A):7);
readln;
end.
var A,B,C:boolean;
function f(C,B,A:boolean):boolean;
begin
f:=((A and C) and(not B))and(B or A);
end;
begin
writeln('C':7,'B':7,'A':7,'F':7);
for C:=false to true do
for B:=false to true do
for A:=false to true do
writeln(C:7,B:7,A:7,f(C,B,A):7);
readln;
end.