#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int Max_N = 1e3 + 7;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  int number[100 + 3];
  for (int i = 1; i <= n; i++) {
    cin >> number[i];
  }
  sort(number + 1, number + n + 1);
  for (int i = 1; i <= n; i += 2) {
    if (i != 1) printf(" ");
    printf("%d", number[i]);
  }
  if (n % 2 == 1) n -= 1;
  for (int i = n; i > 0; i -= 2) {
    printf(" %d", number[i]);
  }
  return 0;
}
