#include <bits/stdc++.h>
using namespace std;
int modInverse(int a, int m);
int gcd(int a, int b);
int power(int x, unsigned int y, unsigned int m);
void pairsort(int a[], int b[], int n);
int logint(int x, int y);
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int power(int x, unsigned int y, unsigned int m) {
  if (y == 0) return 1;
  int p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
int modInverse(int a, int m) {
  int m0 = m;
  int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    int q = a / m;
    int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
void pairsort(int a[], int b[], int n) {
  pair<int, int> pairt[n];
  for (int i = 0; i < n; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + n);
  for (int i = 0; i < n; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
int logint(int x, int y) {
  int ans = 0;
  int a = 1;
  for (int i = 0; i < x; i++) {
    if (x <= a) {
      return ans;
    }
    ans++;
    a *= y;
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int id = 21; id < 51; id++) {
    int t = ((min(id, 25) + id) % (2 + id % 3)) > 0;
    cout << t << '\n';
  }
  return 0;
}

### Prompt

Create a solution in CPP for the following problem:

In this problem you have to solve a simple classification task: given an image, determine whether it depicts a Fourier doodle. 

You are given a set of 50 images with ids 1 through 50. You are also given a text file labels.txt containing the labels for images with ids 1 through 20, which comprise the learning data set. 

You have to output the classification results for images with ids 21 through 50 in the same format.

Input

[Download the images and the training labels](http://tc-alchemy.progopedia.com/fourier-doodles.zip)

Each line of the file labels.txt contains a single integer 0 or 1. Line i (1-based) contains the label of the image {i}.png. Label 1 means that the image depicts a Fourier doodle, label 0 - that it does not.

Output

Output 30 lines, one line per image 21 through 50. Line i (1-based) should contain the classification result for the image {i + 20}.png.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
int modInverse(int a, int m);
int gcd(int a, int b);
int power(int x, unsigned int y, unsigned int m);
void pairsort(int a[], int b[], int n);
int logint(int x, int y);
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int power(int x, unsigned int y, unsigned int m) {
  if (y == 0) return 1;
  int p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
int modInverse(int a, int m) {
  int m0 = m;
  int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    int q = a / m;
    int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
void pairsort(int a[], int b[], int n) {
  pair<int, int> pairt[n];
  for (int i = 0; i < n; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + n);
  for (int i = 0; i < n; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
int logint(int x, int y) {
  int ans = 0;
  int a = 1;
  for (int i = 0; i < x; i++) {
    if (x <= a) {
      return ans;
    }
    ans++;
    a *= y;
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int id = 21; id < 51; id++) {
    int t = ((min(id, 25) + id) % (2 + id % 3)) > 0;
    cout << t << '\n';
  }
  return 0;
}

```