#include<iostream>
#include<vector>
using namespace std;
vector <int> solve(vector <int> A){
    int N = A.size();
    vector <int> ans;
    int M;
    if(N % 2 == 1){
        M = (N - 1) / 2;
    }else{
        M = (N - 2) / 2;
    }
    for(int i = 0; i < N - 1; i ++){
        if(i == M){
            ans.push_back(N - 1);
        }
        ans.push_back(i);
    }
    return ans;
}