#include <bits/stdc++.h>
using namespace std;

std::vector<int> getVisionPattern1d() {
    return {1, 1, 2, 3};
}

int getMove1d(std::vector<int> v) {
    int mid = ((int)v.size()) / 2;
    int n = (int)v.size();
    if (v[mid] == 1) {
        for (int i = 0; i < n; ++i) if (v[i] != 1) return i;
    }
    if (v[mid] == 2) {
        for (int i = 0; i < n; ++i) if (v[i] == 3) return i;
    }
    else {
        if (v[mid + 1] == 1) return n - 1;
        else return 0;
    }
}

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

std::pair<int, int> getMove2d(std::vector<std::vector<int>> v) {
}
#ifdef LOCAL
int main () {

}
#endif // LOCAL
