#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
int n, a[maxn], b[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  int l = 1, r = (n + 1) / 2 + 1;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1)
      printf("%d ", a[l++]);
    else
      printf("%d ", a[r++]);
  }
}
