#include <bits/stdc++.h>
#include "code.h"

using namespace std;

vector<pair<int, int>> ZapisiTacke(int n){
    vector<pair<int, int>> v(n+1);
    v[1] = {0, 0};
    v[2] = {1, 0};
    v[3] = {2, 0};
    v[4] = {3, 1};

    for(int i = 5; i <= n; i++){
        v[i] = {i-1, (i+1)%2};
    }
    return v;
}

vector<int> Resi(int n, int q){
    vector<int> ans1(n+1), ans2(n+1);
    for(int i = 1; i <= n; i++){
        ans1[i] = i;
        ans2[i] = n-i+1;
    }

    int a = Pitaj(1, 2, 3);
    if(a == 0) return ans1;
    return ans2;
}