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