#include "partition.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int maxn = 2e5 + 10;
//vector < pair < int, int > > g;
int n, used[maxn];
std::vector<int> solve(std::vector<int> A)
{
     
    n = A.size();
    for (int i = 0; i < n; ++ i)
        used[i] = 0;
    //g.clear();
    vector < int > ans;
    int total = 0;
    for (int i = n; i >= 1; -- i)
    {
        if(used[i])continue;
        total += i;
        used[i] = 1;
        used[n-i]  =1;
        ans.pb(i-1);
        if(i != (n-i))ans.pb(n-i-1);
    }
    
    return ans;
}
