#include<bits/stdc++.h>
using namespace std;
vector<int> getVisionPattern1d()
{
    return {3, 1, 1, 1, 2, 1};
}
int getMove1d(vector<int> v)
{
    if(v.size() == 3)
    {
        if(v[0] == 3) return 0;
        if(v[2] == 3) return 2;
        if(v[0] == 2) return 0;
        if(v[2] == 2) return 2;
        return 2;
    }
    if(v.size() == 5)
    {
        if(v[4] == 3) return 4;
        if(v[0] == 3) return 0;
        assert(false);
    }
    if(v.size() == 7)
    {
        if(v[1] == 2) return 6;
        if(v[5] == 2) return 0;
        assert(false);
    }
    assert(false);
}
vector<vector<int> > getVisionPattern2d()
{
    return {{}};
}
pair<int, int> getMove2d(vector<vector<int> > v)
{
    return {0, 0};
}
