#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
int a[10005];
vector<int> v, ans;
int main() {
  ios::sync_with_stdio(false);
  int n, x, flag = 1;
  cin >> n;
  for (int i = (1); i <= (n); i++) cin >> x, v.push_back(x);
  sort(v.begin(), v.end());
  int st = 1;
  for (int i = 0, j = v.size() - 1; i <= j; i++, j--) {
    if (i == j) {
      ans.push_back(v[i]);
      continue;
    }
    ans.push_back(v[i]);
    ans.push_back(v[j]);
  }
  for (int i = 1; i < ans.size(); i++) {
    if ((i + 1) % 2 && ans[i] > ans[i - 1]) flag = 0;
    if ((i + 1) % 2 == 0 && ans[i] < ans[i - 1]) flag = 0;
  }
  if (!flag)
    cout << "Impossible\n";
  else
    for (auto i : ans) cout << i << " ";
  return 0;
}
