#include <bits/stdc++.h>
using namespace std;
inline int Readin() {
  int K = 0;
  char C = ' ';
  while (C < '0' or C > '9') C = getchar();
  while (C <= '9' and C >= '0')
    K = (K << 1) + (K << 3) + C - '0', C = getchar();
  return K;
}
const int MaxN = 1000 + 5;
int N, Nn, A[MaxN];
int main() {
  N = Readin();
  Nn = N >> 1;
  for (register int i = 0; ++i <= N; A[i] = Readin())
    ;
  sort(A + 1, A + 1 + N);
  for (register int i = 1; i <= Nn; ++i) printf("%d %d ", A[i], A[N - i + 1]);
  if (N & 1) printf("%d ", A[Nn + 1]);
  return not printf("\n");
}
