#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvl = vector<vll>;
using pll = pair<ll,ll>;
using vpl = vector<pll>;
using vvp = vector<vpl>;
#define f first
#define s second
#define pb push_back
#define all(v) v.begin(),v.end()
deque<ll> solve(long long k){
deque<ll> ans;
if(k==1)return ans;
ans = solve(k/2);
ans.pb(ans.size());
if(k%2==1)ans.push_front(ans.size());
return ans;
}
std::vector<int> construct_permutation(long long k){
deque<ll> ans = solve(k);
vector<int> ret;
for(ll i:ans)ret.pb(i);
return ret;
}