#include <bits/stdc++.h>
const int inf = 0x3f3f3f3f, Minf = 0x7f7f7f7f;
using namespace std;
int a[1050], ans[1050];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  sort(a + 1, a + 1 + n);
  reverse(a + 1, a + 1 + n);
  int l = 1, r = n;
  for (int i = 1; i <= n; ++i) {
    if (i & 1)
      ans[l++] = a[i];
    else
      ans[r--] = a[i];
  }
  for (int i = 1; i <= n; ++i) cout << ans[i] << " ";
  return 0;
}
