#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
int a[maxn];
int n;
bool cmp(int a, int b) { return a > b; }
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n, cmp);
  int even = 0, odd = n / 2;
  for (int i = 1; i < n; i++) {
    if (i % 2 == 1) {
      cout << a[odd++] << " ";
    } else {
      cout << a[even++] << " ";
    }
  }
  if (n % 2)
    cout << a[odd++] << "\n";
  else
    cout << a[even++] << "\n";
  return 0;
}
