#include <bits/stdc++.h>
using namespace std;
int n, a[1010], p[1010], ans[1010];
int main() {
  int i, t = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  int st1 = 1, st2 = (n + 1) / 2 + 1;
  while (1) {
    t++;
    if (t % 2 == 1)
      ans[t] = a[st1++];
    else
      ans[t] = a[st2++];
    if (t == n) break;
  }
  for (i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
