#include <bits/stdc++.h>
using namespace std;
std::vector<int> vi;
int n;
long long arr[1000];
int main(int argc, char const *argv[]) {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  for (int i = 0; i < ceil(double(n - 1) / 2); i++) {
    cout << arr[i] << " " << arr[n - 1 - i] << " ";
  }
  if (n % 2 == 1) {
    cout << arr[n / 2] << " ";
  }
  cout << endl;
  return 0;
}
