#include <bits/stdc++.h>
using namespace std;
int a[1005], ans[1005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + 1 + n);
  int k = 1, x = 1, d = 0;
  while (k <= n) {
    ans[x + d] = a[k++];
    if (k <= n)
      ans[n - x - d + 1] = a[k++];
    else
      break;
    d++;
  }
  for (int i = 1; i <= n; i++) printf("%d%c", ans[i], i == n ? '\n' : ' ');
  return 0;
}
