#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, id, j, k, x, p, m = INT_MAX, flag;
  n = 50;
  for (id = 21; id <= n; id++) {
    flag = ((min(id, 25) + id) % (2 + id % 3)) > 0;
    cout << flag << endl;
  }
  return 0;
}
