#include <bits/stdc++.h>
using namespace std;
bool check(long ans[], long n);
int main() {
  long j, k, n, i, ans[1005], temp[1005], fin[1005];
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &ans[i]);
  sort(ans + 1, ans + n + 1);
  j = n;
  for (i = 1; i <= n / 2; i++) {
    temp[i] = ans[j];
    j--;
  }
  k = 1;
  j = 1;
  for (i = 1; i <= n; i++) {
    if (i % 2 != 0)
      fin[i] = ans[k], k++;
    else
      fin[i] = temp[j], j++;
  }
  if (check(fin, n)) {
    for (i = 1; i < n; i++) printf("%d ", fin[i]);
    printf("%d\n", fin[n]);
  } else
    printf("Impossible\n");
}
bool check(long ans[], long n) {
  bool c = true;
  int i;
  i = 2;
  while (c && i <= n) {
    if (i % 2 == 0) {
      if (ans[i] < ans[i - 1]) c = false;
    } else {
      if (ans[i] > ans[i - 1]) c = false;
    }
    i++;
  }
  return c;
}
