#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void redirectIO() {
  ios::sync_with_stdio(false);
  cin.tie(0);
}
int main() {
  redirectIO();
  long long a[110];
  int n;
  cin >> n;
  for (int i = 0; i < (n); i++) cin >> a[i];
  sort(a, a + n);
  deque<long long> d;
  for (int i = 0; i < (n); i++) {
    if (i % 2 == 0)
      d.push_back(a[i]);
    else
      d.push_front(a[i]);
  }
  for (long long x : d) cout << x << " ";
  cout << endl;
  return 0;
}
