#include <bits/stdc++.h>

using namespace std;

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

int getMove1d(vector<int>v)
{
    int s = v.size();
    int c = (s-1)/2;
    int n = c%3+1;
    if(v[c-1]==n)return c-1;
    if(v[c+1]==n)return c+1;
}

vector<vector<int>> getVisionPattern2d()
{
    return { {1, 2, 3}, {2, 3, 4}, {3, 4, 5}};
}

pair<int, int> getMove2d(vector<vector<int>>v)
{
    int s = v.size();
    int c = (s-1)/2;
    int n = c%6+1;
    if(v[c][c+1]==n)return {c, c+1};
    if(v[c][c-1]==n)return {c, c-1};
    if(v[c+1][c]==n)return {c+1, c};
    if(v[c-1][c]==n)return {c-1, c};
    if(v[c-1][c+1]==n)return {c-1, c+1};
    if(v[c-1][c-1]==n)return {c-1, c-1};
    if(v[c+1][c+1]==n)return {c+1, c+1};
    if(v[c+1][c-1]==n)return {c+1, c-1};
}
