#include<bits/stdc++.h>
using namespace std;

vector<pair<int, int>> ZapisiTacke(int N){
    vector<pair<int, int>> tacke(N+1);
    tacke[1] = {0,1};
    tacke[2] = {1,0};
    tacke[3] = {2,-1};
    for(int i=4;i<=N;i++){
        tacke[i] = {rand(), rand()};
    }
    return tacke;
}

vector<int> Resi(int N, int Q){
    vector<int> resenje(N+1);
    if(Pitaj(1,2,3)==0){
        for(int i=1;i<=N;i++) resenje[i] = i;
    }
    else{
        for(int i=1;i<=N;i++) resenje[i] = N-i+1;
    }
    return resenje;
}