#include <stdio.h>
#define and &&
#define or ||
#define not !
int main (void) {
int c, b, a, x;
printf ("c b a x c b a\n");
for (c = 0; c <= 1; c++) {
for (b = 0; b <= 1; b++) {
for (a = 0; a <= 1; a++) {
for (x = 0; x <= 1; x++)
printf ("%i %i %i %i %i %i %i\n", c, b, a, x, (not c and not b and a and x) or (not c and b and not a), (not c and not b and a and not x) or (not c and not a and x), (not c and not b and not x) or (not c and not a and not x));
}
}
}
return 0;
}