#include <iostream>
#include <vector>

using namespace std;

int main()
{
    long long n;
    while(cin>>n){
        vector  v(n);
        for(auto& i:v) cin>>i;
        for(int j=1; j<v.size(); j++){
            int x = v[j];
            int l=j;
            while(l>0 && v[l-1]>x){
                v[l] = v[l-1];
                l--;
            }
            v[l] = x;
        }
        for(auto& k:v) cout<<k<<" ";