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

using namespace std;

typedef int64_t ll;

std::vector<int> solve(std::vector<int> A) {

    vector<int> ans;

    ll n = A.size();

    if (n & 1) {
        for (ll i = 0; i < n; i += 2) {
            ans.push_back(i);
        }
        for (ll i = 1; i < n; i += 2) {
            ans.push_back(i);
        }
    } else {
        for (ll i = 1; i < n; i += 2) {
            ans.push_back(i);
        }

        for (ll i = 0; i < n; i += 2) {
            ans.push_back(i);
        }
    }

    return ans;
}
