#include <bits/stdc++.h>
using namespace std;
string S = "AEFHIKLMNTVWXYZ";
int main() {
  for (int i = (21), _t = (51); i < _t; ++i) {
    bool a = (min(i, 25) + i) % (2 + i % 3) > 0;
    cout << a << endl;
  }
  return 0;
}
