#include<stdio.h>
int i;
void mergesort(int *a,int left,int right )
{
int mid;
if(left<right)
{
mid=(left + right)/2;
mergesort(a,left,mid);
mergesort(a,mid+1,right);
mergearray(a,left,mid,right);
}
}
void mergearray(int *a,int left,int mid,int right)
{
int temp[100000];
int x,y,z;
x=left; y=mid+1; z=0;
while(x<=mid && y<=right)
{
if(a[x]<=a[y]) temp[z++]=a[x++];
else temp[z++]=a[y++];
}
while(x<=mid) temp[z++]=a[x++];
while(y<=right) temp[z++]=a[y++];
for(x=0;x<z;x++) a[left+x]=temp[x];
}
int main()
{
int n;
int a[i];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
mergesort(a,0,n-1);
for(i=0;i<n;i++)
{
printf("%d",a[i]);
printf(" ");
}
return 0;
}