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