#include "partition.h"
#include<iostream>
#include<vector>
#include <map>
using namespace std;
vector<int> solve(vector<int> A)
{
    vector<int>sol;
    int n=0;
    sol.clear();
    while (A.size()) n++,A.pop_back();

    sol.push_back(n-1);
    for (int i=0; i<n-1; i++)
    sol.push_back(i);

    return sol;
}/*

int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t ;
    for (int test=1; test<=t; test++) {
        int n;
        cin >> n ;
        vector <int> a(n);
        for (int i=0; i<n; i++) {
            cin >> a[i] ;
        }

        for (auto ind : solve(a)) {
            cout << ind << " ";
        }
        cout << endl ;
    }
    cout << endl ;
    return 0;
}*/
