#include <bits/stdc++.h>

using namespace std;

vector<int> getVisionPattern1d() {
    int m = 40;
    vector<int> res(m);
    for (int i = 0; i < m; i += 4) {
        res[i] = 1;
        res[i + 1] = 1;
        res[i + 2] = 2;
        res[i + 3] = 3;
    }
    return res;
}

int getMove1d(vector<int> v) {
    if (v.size() == 3) {
        for (int i = 0; i < v.size(); i++) {
            if (v[i] > 1)
                return i;
        }
    }
    else if (v.size() == 5) {
        for (int i = 0; i < v.size(); i++) {
            if (v[i] == 3)
                return i;
        }
    }
    return (v[0] == 1 ? 6 : 0);
}

vector<vector<int>> getVisionPattern2d() {
}

pair<int, int> getMove2d(vector<vector<int>> v) {
}