#include <cstdio>
#include <cstdlib>
using namespace std;
FILE *f = fopen ( "algsort.in" , "r" ) , *g = fopen ( "algsort.out" , "w" );
const int MAX = 500005;
int Size , myInts [ MAX ] , i;
void read()
{
fscanf ( f , "%d" , &Size );
for ( i = 0 ; i < Size ; i ++ )
fscanf ( f , "%d" , &myInts [ i ] );
}
void print()
{
for ( i = 0 ; i < Size ; i ++ )
fprintf ( g , "%d " , myInts [ i ] );
}
/*int partition ( int left , int right )
{
int i , j , x;
//pre: left < right, frame: only myInts[left..right) changes, by a permutation
i = left + 1 , j = right;
x = myInts [ left ];
//inv: left < i <= j <= right & myInts[left..i-1) < x & x <= myInts[j..r)
//myInts[left . . i − 1) ++ [x] ++ myInts[i . . right) is a permutation of initial myInts[left..right)
while ( i != j )
{
while ( i != j && myInts [ i ] < x ) myInts [ i - 1 ] = myInts [ i ++ ];
while ( i != j && x <= myInts [ j - 1 ] ) j --;
if ( i != j ) //myInts [ j − 1 ] < x ≤ myInts [ i ] so i < j − 1
myInts [ i - 1 ] = myInts [ j - 1 ] , myInts [ j - 1 ] = myInts [ i ] , i ++ , j --;
}
myInts [ i - 1 ] = x;
return i - 1;
//post: left ≤ i < right & a[left . . i) < x & myInts[i] = x & x ≤ a[i . . right)
//myInts[left . . right) is a permutation of its initial value
}*/
/*int partition ( int left , int right )
{
int pivot = myInts [ right - 1 ] , i = left , j , aux;
for ( j = left ; j < right - 1 ; j ++ )
if ( myInts [ j ] <= pivot )
aux = myInts [ i ] , myInts [ i ++ ] = myInts [ j ] , myInts [ j ] = aux;
aux = myInts [ i ] , myInts [ i ] = myInts [ right - 1 ] , myInts [ right - 1 ] = aux;
return i;
}*/
/*int partition ( int left , int right )
{
int pivot = myInts [ left ] , i = left - 1 , j = right , aux;
while ( true )
{
do j --; while ( myInts [ j ] > pivot );
do i ++; while ( myInts [ i ] < pivot );
if ( i < j )
aux = myInts [ i ] , myInts [ i ] = myInts [ j ] , myInts [ j ] = aux;
else
return j + 1;
}
} // for this implementation only change Qsort ( i + 1 , right ) to Qsort ( i , right )*/
/*void Qsort( int left , int right )
{
if ( left + 1 < right )
{
//pre: left < right, frame: only myInts[left..right) changes, by a permutation
int i = partition ( left , right ); //myInts[left . . i) < x & myInts[i] = x & x ≤ myInts[i . . right)
Qsort ( left , i );
Qsort ( i + 1 , right );
}
}*/
int cmp ( const void *p , const void *q )
{
return *( int * ) p - *( int * ) q;
}
int main()
{
read();
//Qsort( 0 , Size );
qsort ( myInts , Size , sizeof ( myInts [ 0 ] ) , cmp );
print();
return 0;
}