#include <bits/stdc++.h>
using namespace std;
int N;
vector <int> solve(vector <int> A)
{
  N = A.size();
  vector <int> V(N);
  for(int i = 0; i < N; i++) V[i] = i;
  swap(V[N - 1], V[(N - 1) >> 1]);
  return V;
}