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