#include <bits/stdc++.h>

using namespace std;
using ll = long long;

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

/*
1: 3 1 2 sau 2 1 3
2: 3 1 2 3 1 sau  1 3 2 1 3
3: 3 1 2 3 1 2 3
*/

int getMove1d(vector<int> v) {
    if (v == {3, 1, 2}) return 0;
    if (v == {2, 1, 3}) return 2;

    if (v == {3, 1, 2, 3, 1}) return 3;
    if (v == {1, 3, 2, 1, 3}) return 1;

    if (v == {3, 1, 2, 3, 1, 2, 3}) return 4;
    if (v == {3, 2, 1, 3, 2, 1, 3}) return 2;
    assert(false);
}

vector<vector<int>> getVisionPattern2d() {
    ;
}

pair<int, int> getMove2d(vector<vector<int>> v) {
    ;
}
