#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 5;
deque<int> dq;
int a[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + 1 + n);
  for (int i = n; i >= 1; i--) {
    if (i & 1) {
      dq.push_back(a[i]);
    } else {
      dq.push_front(a[i]);
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << dq.front() << " ";
    dq.pop_front();
  }
  cout << endl;
}
