#include "partition.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

vector<int> solve(vector<int> A) {
    int n = A.size();
    vector<int> rez;
    if (n % 2 == 0) {
        for (int i = 0; i < n/2 - 1; i++) rez.push_back(i);
        rez.push_back(n - 1);
        for (int i = n/2 - 1; i < n - 1; i++) rez.push_back(i);
    } else {
        for (int i = 0; i < n/2; i++) rez.push_back(i);
        rez.push_back(n - 1);
        for (int i = n/2; i < n - 1; i++) rez.push_back(i);
    }

    return rez;
}
