#include <bits/stdc++.h>
using namespace std;
int n, a[100011], b[100011];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  if (n == 1) {
    cout << a[1];
    return 0;
  }
  if (n == 2) {
    cout << a[1] << " " << a[2];
    return 0;
  }
  b[1] = a[1];
  b[2] = a[n];
  int l = 2, r = n - 1;
  int c = 3;
  while (l <= r) {
    if (a[l] > b[c - 1]) {
      cout << "Impossible";
      return 0;
    }
    b[c] = a[l];
    l++;
    c++;
    if (c > n) break;
    if (a[r] < b[c - 1]) {
      cout << "Impossible";
      return 0;
    }
    b[c] = a[r];
    r--;
    c++;
    if (c > n) break;
  }
  for (int i = 1; i <= n; i++) cout << b[i] << " ";
  return 0;
}
