#include<iostream>
using namespace std ;
int a[105];
void sort(int xx[],int low,int high);
int main()
{
int i,n;
while(cin >> n)
{
for(i = 0; i <= n-1; i++)
cin >> a[i];
sort(a,0,n-1);
for(i = 0; i <= n-1; i++)
cout << a[i] << ' ';
cout << endl;
}
return 0;
}
void sort(int xx[],int l,int h)
{
int low=l,high=h;
int piv;
if(l < h)
{
piv=xx[l];
while(low < high)
{
while(low < high&& xx[high] >= piv)
high--;
xx[low] = xx[high];
while(low < high && xx[low] <= piv)
low++;
xx[high] = xx[low];
}
xx[low]=piv;
sort(xx,l,low-1);
sort(xx,low+1,h);
}
}
/**************************************************************
Problem: 1202
User: true14fans
Language: C++
Result: Accepted
Time:50 ms
Memory:1520 kb
****************************************************************/