#include<iostream>
using namespace std;
 
int main()
{
    int n, a[5000],b=0,c=0,cnt1=0,cnt2=0;
    cin >> n;
    for (int z = 0; z < n; z++) cin >> a[z];
    
    for (int i = 0; i < 2 * n - 3; i++)
    {
        for (int p = 0; p < n - 1; p++) //n-1
        {
            for (int q = i - p; (q > p)&& (q<n); q++)
            {
				if(a[p]>a[q])swap(a[p],a[q]);
				/*
                cnt1++;
                if (a[p] <= a[q]) break;
                cnt2++;
                */
            }
        }
        /*
        if (cnt1 = cnt2)
        {
            for (int x = 0; x < n - 1;x++)
            {
                for (int y = i - x; y < x; y++)
                {
                    a[x] = b, a[y] = c;
                    a[x] = c, a[y] = b;
                }
            }
        }
        */
        
    }
    for (int m = 0; m < n - 1; m++)
    {
        cout << a[m]<<" ";
    }
    cout << a[n - 1] << endl;
}