#include <bits/stdc++.h>
using namespace std;
int main() {
  printf("0\n1\n1\n0\n");
  for (int i = 25; i <= 50; i++)
    printf("%d\n", 1 - (bool)(i % 12 == 3 || i % 12 == 9 || i % 12 == 11));
  return 0;
}
