#include <bits/stdc++.h>
using namespace std;
int arr[101];
int ret[101];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  if (n % 2) {
    int mid = n / 2;
    ret[mid] = arr[n - 1];
    for (int i = n - 2; i >= 0; --i) {
      if (i % 2) {
        ret[mid + (n - i) / 2] = arr[i];
      } else {
        ret[mid - (n - i) / 2] = arr[i];
      }
    }
  } else {
    int mid = n / 2;
    for (int i = n - 1; i >= 0; --i) {
      if (i % 2) {
        ret[mid + (n - i) / 2] = arr[i];
      } else {
        ret[mid - (n - i) / 2] = arr[i];
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ret[i] << " ";
  }
}
