#include <bits/stdc++.h>
using namespace std;
int N;
vector <int> solve(vector <int> A)
{
  N = A.size();
  sort(A.begin(), A.end());
  vector <int> L, R;
  for(int i = 0; i < N; i++)
  {
    if(i & 1) R.push_back(A[i]);
    else L.push_back(A[i]);
  }
  for(int i = 0; i < R.size(); i++) L.push_back(R[i]);
  return L;
}
