#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#include <set>

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

std::vector<std::vector<int>> getVisionPattern2d()
{
    return {{1}};
}

std::pair<int, int> getMove2d(std::vector<std::vector<int>> v)
{
    return {0, 0};
}


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

int getMove1d(vector<int> v) {
    int n = (v.size() - 1) / 2;
    int to = -1;
    if (v[n] == 2) {
        to = 3;
    } else if (v[n] == 3) {
        to = 1;
    } else {
        int mx = max(v[n - 1], v[n + 1]);
        if (mx == 3) {
           to = 1;
        } else {
            to = 2;
        }
    }
    return (v[n - 1] == to ? n - 1 : n + 1);
}