#include <bits/stdc++.h>
using namespace std;
const int N = 102;
const int mod = 997;
const double eps = 1e-9;
inline long long read() {
  long long data = 0, w = 1;
  char ch = getchar();
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') w = -1, ch = getchar();
  while (ch <= '9' && ch >= '0') data = data * 10 + ch - 48, ch = getchar();
  return data * w;
}
inline void file() {
  freopen(
      "a"
      ".in",
      "r", stdin);
  freopen(
      "a"
      ".out",
      "w", stdout);
}
int i, n, a[N];
int main() {
  n = read();
  for (i = 1; i <= n; i++) a[i] = read();
  sort(a + 1, a + n + 1);
  for (i = 1; i <= n; i += 2) printf("%d ", a[i]);
  for (i = 2; i <= n; i += 2)
    ;
  for (i -= 2; i >= 1; i -= 2) printf("%d ", a[i]);
  return 0;
}
