#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long MAXN = 103;
long long n, a[MAXN];
deque<long long> ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i += 1) {
    cin >> a[i];
  }
  sort(a, a + n);
  ans.emplace_back(a[0]);
  for (long long i = 1; i < n - 1 + 1; i += 1) {
    if (i & 1) {
      ans.push_front(a[i]);
    } else {
      ans.push_back(a[i]);
    }
  }
  for (auto v : ans) {
    cout << v << " ";
  }
  cout << '\n';
  return 0;
}
