#include <bits/stdc++.h>
using namespace std;
bool ok[1010];
long long a[1010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int r = 0, l = n - 1;
  for (int i = 0; i < n; i++) {
    if (i % 2)
      cout << a[l--] << " ";
    else
      cout << a[r++] << " ";
  }
}
