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

vector<pair<int, int>> ZapisiTacke(int n)
{
    vector<pair<int,int>> tacke;tacke.push_back({0,0});
    for (int i=0;i<n;i++) tacke.push_back({i,1});
    tacke[2]={1,0};return tacke;
};

vector<int> Resi(int n, int q)
{
    vector<int> perm;perm.push_back(0);
    if (Pitaj(1,2,n)==0)
    {
        for (int i=1;i<=n;i++) perm.push_back(n-i+1);
        return perm;
    }
    for (int i=1;i<=n;i++) perm.push_back(i);
    return perm;
};