#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int mo = 1e9 + 7;
LL qpow(LL a, LL b) {
  LL ans = 1;
  a %= mo;
  while (b) {
    if (b & 1) ans = ans * a % mo;
    b >>= 1;
    a = a * a % mo;
  }
  return ans;
}
deque<int> d;
int main() {
  int n;
  int a[200];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  d.push_back(a[n - 1]);
  for (int i = n - 2; i >= 0; i--) {
    if (i & 1)
      d.push_back(a[i]);
    else
      d.push_front(a[i]);
  }
  int cnt = 0;
  while (d.size()) {
    cnt++;
    if (cnt == n)
      printf("%d\n", d.front());
    else
      printf("%d ", d.front());
    d.pop_front();
  }
  return 0;
}
