#include <bits/stdc++.h>
using namespace std;
long long arr[105], arr2[105];
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  long long n, a;
  deque<long long> dq;
  cin >> n;
  for (long long x = 0; x < n; x++) cin >> arr[x];
  sort(arr, arr + n);
  long long mx = -1;
  long long i = 0, j = n - 1;
  for (long long x = 0; x < n; x++) {
    if (x == 0 || x % 2 == 0) {
      arr2[i] = arr[x];
      i++;
    } else {
      arr2[j] = arr[x];
      j--;
    }
  }
  for (long long x = 0; x < n; x++) {
    cout << arr2[x] << " ";
  }
  return 0;
}
