#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  sort(v.begin(), v.end());
  vector<long long> vs;
  int x = n - 1;
  for (int i = 0; i <= n / 2; ++i) {
    vs.push_back(v[i]);
    vs.push_back(v[x--]);
  }
  bool b = 1;
  for (int i = 0; i < n; ++i) {
    if (vs[0] >= vs[1])
      b == 0;
    else if (vs[i] < vs[i - 1] || vs[i] > v[i + 1])
      b == 0;
  }
  if (b == 0)
    cout << "Impossible\n";
  else
    for (int i = 0; i < n; ++i) cout << vs[i] << " ";
}
