#include <bits/stdc++.h>
using namespace std;
long long a[200], b[200];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
  sort(a, a + n);
  int l = 0;
  for (int i = 0; i <= n / 2; i++) {
    if (b[i] == 0) b[i] = a[l++];
    if (b[n - 1 - i] == 0) b[n - 1 - i] = a[l++];
  }
  for (int i = 0; i < n; i++) {
    if (i == 0)
      printf("%lld", b[i]);
    else
      printf(" %lld", b[i]);
  }
  return 0;
}
