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