#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.push_back({i - 1, 0});
    }
    tacke.push_back({N, 1});
    return tacke;
}

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