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

using namespace std;

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

vector<int> Resi(int N, int Q){
    vector<int> resenje(N+1);
    int x = Pitaj(1, 2, 3);
    if (x == 0) {
        resenje[0] = 1;
        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;
}