#include <bits/stdc++.h>
using namespace std;
int a[105];
int b[105];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n);
  int j = 0;
  for (int i = 0; i < n; i += 2) {
    b[j] = a[i];
    if (i + 1 == n) {
      break;
    }
    b[n - j - 1] = a[i + 1];
    j++;
  }
  for (int i = 0; i < n; ++i) {
    cout << b[i] << " ";
  }
  return 0;
}
