#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
long long a[N], ans[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  int pos = n / 2;
  if (n % 2 == 1) pos++;
  for (int i = n; i >= 1; i--) {
    if (n % 2 == 0) {
      if (i % 2 == 0)
        ans[pos] = a[i];
      else
        ans[n - pos + 1] = a[i], pos--;
    } else {
      if (pos == n / 2 + 1) {
        ans[pos] = a[i];
        pos--;
      } else {
        if (i % 2 == 0)
          ans[pos] = a[i];
        else
          ans[n - pos + 1] = a[i], pos--;
      }
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
}
