#include <bits/stdc++.h>
using namespace std;
int main() {
  int cas = 1, T;
  int n, a[1005], b[1005];
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) cin >> 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++]);
  }
  return 0;
}
