#include using namespace std; #define FOR(i, j, k) for(int i = j; i < k; ++i) #define rep(i, j) FOR(i, 0, j) #define repr(i, j) for(int i = j; i >= 0; --i) #define INF (1 << 30) #define MOD 1e9 + 7 typedef long long ll; typedef unsigned long long ull; typedef pair P; int N; ll a[5000]; int main() { scanf("%d", &N); rep(i, N) scanf("%lld", &a[i]); rep(i, 2 * N - 3) { rep(p, N) { if(i - p <= p) break; else if(i - p >= N) continue; else if(a[p] > a[i - p]) swap(a[p], a[i - p]); } } rep(i, N) { if(i != N - 1) printf("%d ", a[i]); else printf("%lld\n", a[i]); } return 0; }