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