#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 5;
const int maxm = 1e6 + 5;
int hei[maxn];
int ans[maxn];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &hei[i]);
  }
  sort(hei, hei + n);
  for (int i = 0; i < n; i += 2) {
    int a = i >> 1;
    int b = n - 1 - a;
    ans[a] = hei[i];
    if (i + 1 < n) ans[b] = hei[i + 1];
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
