#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int x = 0, f = 1, ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
int n;
int a[1010];
int b[1010];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    if (i & 1)
      printf("%d ", a[(i + 1) / 2]);
    else
      printf("%d ", a[n - i / 2 + 1]);
  }
  return 0;
}
