#include <bits/stdc++.h>
using namespace std;
int n;
int a[101];
int b[101];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int l = 0, r = n - 1, i = 0;
  while (l <= r) {
    if (i % 2 == 0)
      b[l++] = a[i++];
    else
      b[r--] = a[i++];
  }
  for (int i = 0; i < n; i++) cout << b[i] << " ";
}
