#include<iostream>
#include<cstdio>
#include<stdio.h>
#include<iomanip>
#include<algorithm>
#include<vector>
using namespace std;
int s[1000000];
int n;
void qs(int s[],int l,int r)
{
int temp=0;
int low,high;
if(l<r)
{
low=l;temp=s[low];
high=r;
while(low<high)
{
while(temp<=s[high]&&low<high)
high--;
if(low<high)
s[low++]=s[high];
while(temp>=s[low]&&low<high)
low++;
if(low<high)
s[high++]=s[low];
}
s[low]=temp;
qs(s,l,low-1);
qs(s,low+1,r);
}
}
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>s[i];
}
qs(s,1,n);
for(int i=1;i<=n;i++)
{
cout<<s[i]<<" ";
}
return 0;
}