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