#include <bits/stdc++.h>
int min(int a, int b) { return a < b ? a : b; }
int main() {
  int id;
  for (id = 21; id <= 50; id++)
    printf("%d\n", (min(id, 25) + id) % (2 + id % 3) > 0);
  return 0;
}
