#include <iostream>
#include <algorithm>
using namespace std;

using ll = long long;

ll a[5010] = {};


int main(void){
    // Here your code !
    int n;
    cin >> n;
    
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    
    for(int i = 1; i < 2*n-3; i++){
        for(int j = 0; j <= i; j++){
            int t = i - j;
            if( t < j && t < n && j < n && a[t] > a[j]){
                swap(a[t],a[j]);
            }
        }
    }
    
    for(int i = 0; i < n; i++){
        cout << a[i] << ((i == n-1) ? '\n' : ' ');
    }
}