#include "code.h"
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexedset;
//int randi = (mt19937(null));
ll stepen(ll x){
    ll res = 1;
    while(x % 2 == 0){
        x /= 2;
        res++;
    }
    return res;
}
vector<pair<int, int>> ZapisiTacke(int n){
    vector<pair<int, int>>res(n + 1);
    for(int i = 2; i <= n; i++){
        res[i] = make_pair(i, 0);
    }
    res[1] = make_pair(100, 100);
    return res;
}
vector<int> Resi(int n, int Q){
    vector<int>res(n);
    for(int i = 1; i <= n; i++){
        res[i] = i;
    }
    for(int i = 1; i <= n; i++){
        for(int j = i; j <= n; j++){
            int odg = Pitaj(1, res[i], res[j]);
            if(odg == -1){
                swap(res[i], res[j]);
            }
        }
    }
    return res;
}