#include <bits/stdc++.h>
using namespace std;
int arr[105];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &arr[i]);
  sort(arr, arr + n);
  deque<int> dq;
  dq.push_back(arr[n - 1]);
  for (int i = n - 2; i >= 0; --i)
    if (i % 2 == 0)
      dq.push_back(arr[i]);
    else
      dq.push_front(arr[i]);
  for (int i = 0; i < dq.size(); ++i) printf("%d ", dq[i]);
  return 0;
}
