#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define and &&
#define or ||
#define not !
int main (void) {
int x, z2, z1, z0;
time_t t;
srand((unsigned) time(&t));
for (z1 = 0; z1 <= 1; z1++) {
for (z0 = 0; z0 <= 1; z0++) {
for (x = 0; x <= 1; x++) {
printf ("%i %i %i %i %i %i\n", z1, z0, x, (not z1 and not z0 and x) or (z1 and not z0 and not x), (not z1 and not z0) or (not z1 and not x), z0 and not x);
}
}
}
return 0;
}