#include "partition.h"
#include "bits/stdc++.h"
using namespace std;
#define ls(v) (int)v.size()
#define rall(v) v.rbegin(), v.rend()
#define all(v) v.begin(), v.end()
#define pb push_back
#define ff first
#define ss second
#define ll long long
vector<int> solve(vector<int> a) {
    vector<int> ans;
    int n = ls(a);
    int cur = n - 1;
    vector<int> vis(n + 1, 0);
    if(n & 1) cur -= 1;
    while(cur > 0) ans.pb(cur), vis[cur] = 1, cur -= 2;
    for(int i = n - 1;~i;--i) if(!vis[i]) ans.pb(i);
    return ans;
}
