#include <bits/stdc++.h>
using namespace std;
long long n, a[1000], l, r, b[1001], le;
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  r = n - 1;
  while (l <= r) {
    b[l++] = a[le++];
    b[r--] = a[le++];
  }
  if (n % 2) {
    b[(n / 2)] = a[n - 1];
  }
  for (long long i = 0; i < n; i++) {
    cout << b[i] << " ";
  }
}
