#include <bits/stdc++.h>
using namespace std;
int n;
int a[11111];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  int i;
  for (i = 1; i <= n; i += 2) {
    cout << a[i] << ' ';
  }
  if (n % 2 == 0)
    i = n;
  else if (n % 2 == 1)
    i = n - 1;
  for (; i > 0; i -= 2) {
    cout << a[i] << ' ';
  }
}
