#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n, a[N], b[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n / 2; i++) {
    b[i * 2 - 1] = a[i];
    b[i * 2] = a[n - i + 1];
  }
  if (n % 2) b[n] = a[n / 2 + 1];
  int flag = 1;
  for (int i = 3; i <= n; i += 2) {
    if (b[i] > b[i - 1]) {
      flag = 0;
      break;
    }
  }
  for (int i = 2; i <= n && flag; i += 2) {
    if (b[i] < b[i - 1]) {
      flag = 0;
      break;
    }
  }
  if (!flag) {
    puts("Impossible");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    printf("%d", b[i]);
    putchar(i == n ? '\n' : ' ');
  }
  return 0;
}
