#include<bits/stdc++.h>
using namespace std;
vector<pair<int, int>> v;
vector<int> ans;
vector<int> solve(vector<int> a){
    v.clear();
    ans.clear();
    int n = a.size();
    for(int i = 0; i < n; i++){
        v.push_back({a[i], i});
    }
    int pos = n - 1;
    pair<int, int> pr;
    pr = v[(n - 1) / 2];
    v[(n - 1) / 2] = v[pos];
    v[pos] = pr;
    for(int i = 0; i < n; i++){
        //cout << v[i].second << ' ';
        ans.push_back(v[i].second);
    }
    //cout << endl;
    return ans;
}/*
3
5
1 2 4 8 16
4
1 2 4 8
6
1 2 4 8 16 32
*/
