#include <bits/stdc++.h>
using namespace std;
int a[200], n, ans[200];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + (ch ^ 48), ch = getchar();
  return x * f;
}
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 >> 1); ++i)
    ans[i] = a[2 * (i - 1) + 1], ans[n - i + 1] = a[2 * (i - 1) + 2];
  if (n % 2 == 1) ans[(n >> 1) + 1] = a[n];
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}
