#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n;
    int arr[n];

    for ( int i = 0 ; i < n ; i ++ )
    {
        cin >> arr[i];
    }

    int min = arr[0];
    for ( int x = 0 ; x < n - 1 ; x ++ )
    {
        min = arr[x + 1];
        for ( int d = 0 ; d < n ; d ++ )
        {
            if ( arr[d] < min && d > x ) 
            {
               swap ( arr[x] , arr[d] );
               min = arr[x];
            }  
        }

    }

    for ( int i = 0 ; i < n ; i ++ )
    {
        cout << arr[i] <<" ";
    }


    return 0;
}