#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef pair<int, int> ii;
typedef vector<ii> vii;

std::vector<int> solve(std::vector<int> A) {
    int n = A.size();
    vi a;
    for (int i = n-2;i>0;--i) {
        a.push_back(i);
    }
    a.push_back(n-1);
    a.push_back(0);
    return a;
}
