#include <bits/stdc++.h>
using namespace std;
long long a[300], b[120];
int main() {
  int n, i = 150, j = 151, flag = 0, t;
  scanf("%d", &n);
  t = n;
  for (int k = 0; k < n; k++) scanf("%lld", &b[k]);
  sort(b, b + n);
  for (int k = 0; k < n; k++) {
    if (flag)
      a[i--] = b[k];
    else
      a[j++] = b[k];
    flag ^= 1;
  }
  for (int k = i + 1; k < j - 1; k++) printf("%lld ", a[k]);
  printf("%lld\n", a[j - 1]);
  return 0;
}
