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