#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> v;
typedef vector<v> vv;
typedef vector<vv> vvv;
typedef pair<ll, ll> p;
typedef vector<p> vp;
typedef vector<vp> vvp;
typedef vector<vvp> vvvp;
typedef pair<ll, p> tri;
typedef vector<tri> vtri;
typedef vector<vtri> vvtri;
typedef vector<vvtri> vvvtri;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<vvb> vvvb;

#define f first
#define s second
#define pb push_back
#define eb emplace_back
#define all(v) (v).begin(),(v).end()

const ll INF = 1e18;
const ll mod = 1e9 + 7;

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

int getMove1d(std::vector<int> v)
{
    if (v.size() == 3)
    {
        if (v[0] == 1) return 2;
        else return 0;
    }
    else if (v.size() == 5)
    {
        if (v[0] == 1) return 4;
        else if (v[0] == 3) return 0;
        else if (v[4] == 3) return 3;
        else if (v[4] == 1) return 0;
    }
    else
    {
        if (v[1] == 2) return 7;
        else return 0;
    }
}

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

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