#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e2 + 5;
const int MOD = 1e9 + 7;
double eps = 1e-9;
map<int, int> cnt;
int a[MAXN];
int n;
int ans[MAXN];
void solve() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    cnt[a[i]]++;
  }
  int c;
  int i = 0;
  char f = 0;
  for (map<int, int>::iterator it = cnt.begin(); it != cnt.end(); it++) {
    c = it->second;
    while (c--) {
      ans[(f ? i : n - 1 - i)] = it->first;
      if (f) i++;
      f = !f;
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
}
int main() {
  if (!1) {
    freopen(
        ""
        ".in",
        "r", stdin);
    freopen(
        ""
        ".out",
        "w", stdout);
  }
  int T = 1;
  if (0) {
    scanf("%d", &T);
  }
  while (T--) {
    solve();
  }
  return 0;
}
