#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n;
  m = n - 2;
  int a[n], b[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  b[n / 2] = a[n - 1];
  for (int i = 1; i <= n / 2; i++) {
    b[n / 2 - i] = a[m];
    b[n / 2 + i] = a[m - 1];
    m = m - 2;
  }
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  return 0;
}
