#include <bits/stdc++.h>

using namespace std;

vector<int> solve(vector<int> a)
{
    int n = a.size();
    vector<int>ind;
    for(int i = 0;i < n; i++)
    {
        ind.push_back(0);
    }
    if(n%2==0)
    {
        for(int i = 0;i < n/2 - 1; i++)
        {
            ind[i]=i;
        }
        ind[n/2-1] = n-1;
        for(int i = n/2; i<n;i++)
        {
            ind[i]=i-1;
        }
    }
    else
    {
        for(int i = 0;i<(n+1)/2; i++)
        {
            ind[i]=i;
        }
        ind[(n+1)/2]=n-1;
        for(int i = (n+1)/2+1;i<n;i++)
        {
            ind[i] = i-1;
        }
    }
    return ind;
}
