vector<int> solve(vector<int> A){
    N=A.size();
    for(int i=0;i<N;i++){
        res.push_back(i);
    }
    if(N%2){
        swap(res[N-1],res[N/2]);
    }
    else{
        swap(res[N-1],res[N/2-1]);
    }

    for(int i=0;i<N;i++){
        ///cout << res[i]<< " ";
    }

    return res;
}