#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 7;
int A[N], B[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &A[i]);
  sort(A, A + n);
  for (int i = 0; i < n; ++i) {
    if (i & 1)
      B[n - 1 - i / 2] = A[i];
    else
      B[i / 2] = A[i];
  }
  for (int i = 0; i < n; ++i) printf("%d ", B[i]);
  return 0;
}
