#include "bits/stdc++.h"
#include "partition.h"
// #include "grader.cpp"
using namespace std;

#define ll long long

ll n, ans, S, s;

vector <int> solve(vector<int> A) {
    n = (int)A.size();
    int l = max(0ll,(n / 2 - 1));
    int r = max(0ll, (n / 2 - 2));
    swap(A[n - 1], A[l]);
    if(n >= 2) swap(A[n - 2], A[r]);
    return A;
}