#include <bits/stdc++.h>
using namespace std;
long long rand16() { return rand() & ((1LL << (16)) - 1); }
long long my_rand() { return rand16() << 32 | rand16() << 16 | rand16(); }
double safe_sqrt(double x) { return sqrt(max((double)0.0, x)); }
long long GI(long long& x) { return scanf("%lld", &x); }
long long f(long long id) { return ((min(id, 25LL) + id) % (2 + id % 3)) > 0; }
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << (fixed) << setprecision(9) << boolalpha;
  for (long long i = (21), _i = (50); i <= _i; ++i) cout << f(i) << endl;
  return 0;
}
