#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e3 + 10;
const int inf = 2e9;
const double eps = 1e-7;
const long long INF = (long long)1e18;
int a[N];
int main() {
  int n;
  scanf("%d", &(n));
  for (int i = 0; i < (n); ++i) scanf("%d", &(a[i]));
  sort(a, a + n);
  int k = n - 1;
  int cnt = 0, i = 0;
  while (cnt < n) {
    cout << a[i++] << " ";
    cnt++;
    if (cnt < n) {
      cout << a[k--] << " ";
      cnt++;
    }
  }
  return 0;
}
