#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  sort(a.begin(), a.end());
  if (n & 1) {
    for (int i = 0; i < n; i += 2) {
      cout << a[i] << " ";
    }
    for (int i = n - 2; i >= 0; i -= 2) {
      cout << a[i] << " ";
    }
    cout << "\n";
  } else {
    for (int i = 0; i < n; i += 2) {
      cout << a[i] << " ";
    }
    for (int i = n - 1; i >= 0; i -= 2) {
      cout << a[i] << " ";
    }
    cout << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
