#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-10;
const long long MOD = 1e9 + 7;
const long long OO = 1e10;
const int N = 5e5 + 5;
int a[101];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a, a + n);
  int i = 1, j = n - 2;
  while (i < j) {
    swap(a[i], a[j]);
    i++;
    j--;
  }
  for (int i = n - 1; i >= 0; --i) cout << a[i] << ' ';
}
