#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair <ll, ll>
#define ret return
#define pb push_back
#define all(x) x.begin(), x.end()
#define fr first
#define sc second
vector <int> solve(vector <int> a) {
    int n = a.size();
    vector <int> ans;
    if((n - 1) % 2 == 0) {
        for(int i = 0; i < (n - 1) / 2 - 1; ++i) ans.pb(a[i]);
        ans.pb(a[n - 1]); 
    } else {
        for(int i = 0; i < (n - 1) / 2 - 1; ++i) ans.pb(a[i]);
        ans.pb(a[n - 1]); 
    }
    return ans;
}