#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int mid = n / 2 + n % 2;
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    if (i % 2 == 1) {
      swap(v[i], v[mid]);
      mid++;
    }
  }
  for (int i = 1; i < n; i++) {
    if ((i % 2) == 1) {
      if (v[i - 1] > v[i]) {
        cout << "Impossible" << endl;
        return 0;
      }
    } else {
      if (v[i - 1] < v[i]) {
        cout << "Impossible" << endl;
        return 0;
      }
    }
  }
  for (auto a : v) cout << a << " ";
}
