#include<stdio.h>
#include<stdlib.h>
int cmp(const void *a,const void *b)
{
return *(int*)a-*(int*)b;
}
void swap(int*a,int*b)
{
int temp;
temp=*a;
*a=*b;
*b=temp;
}
void bubble_sort(int a[],int n)
{
int i,j,flag;
for(j=n-1;j>=0;j--)
{
flag=0;
for(i=0;i<j;i++)
if(a[i]>a[i+1])
{
flag=1;
swap(&a[i],&a[i+1]);
}
if(flag==0)
break;
}
}
void insert_sort(int a[],int n)
{
int i,j,temp;
for(i=1;i<n;i++)
{
temp=a[i];
for(j=i;j>0&&a[j-1]>temp;j--)
a[j]=a[j-1];
a[j]=temp;
}
}
void shell_sort(int a[],int n)
{
int delta[]={929, 505, 209, 109, 41, 19, 5, 1, 0};
int i,j,temp,s,D;
for(s=0;delta[s]>=n;s++);
for(D=delta[s];D>0;D=delta[++s])
{
for(i=D;i<n;i++)
{
temp=a[i];
for(j=i;j>=D&&a[j-D]>temp;j-=D)
a[j]=a[j-D];
a[j]=temp;
}
}
}
void percdown(int a[],int p,int n)
{
int parent,child,temp;
temp=a[p];
for(parent=p;parent*2+1<n;parent=child)
{
child=parent*2+1;
if(child!=n-1&&a[child]<a[child+1])
child+=1;
if(temp>=a[child]) break;
else a[parent]=a[child];
}
a[parent]=temp;
}
void heapsort(int a[],int n)
{
int i;
for(i=n/2;i>=0;i--)
percdown(a,i,n);
for(i=n-1;i>0;i--)
{
swap(&a[0],&a[i]);
percdown(a,0,i);
}
}
void merge(int a[],int temp[],int l,int r,int rend)
{
int lend,lenth,tmp,i;
lend=r-1;
tmp=l;
lenth=rend-l+1;
while(l<=lend&&r<=rend)
{
if(a[l]<=a[r])
temp[tmp++]=a[l++];
else
temp[tmp++]=a[r++];
}
while(l<=lend)
temp[tmp++]=a[l++];
while(r<=rend)
temp[tmp++]=a[r++];
for(i=rend+1-lenth;i<=rend;i++)
a[i]=temp[i];
}
void merge_sort(int a[],int temp[],int l,int rend)
{
int center;
if(l<rend)
{
center=(l+rend)/2;
merge_sort(a,temp,l,center);
merge_sort(a,temp,center+1,rend);
merge(a,temp,l,center+1,rend);
}
}
void mainmerge(int a[],int n)
{
int temp[n];
merge_sort(a,temp,0,n-1);
}
void merge_pass(int a[],int temp[],int n,int lenth)
{
int i,j;
for(i=0;i<=n-2*lenth;i+=2*lenth)
{
merge(a,temp,i,i+lenth,i+2*lenth-1);
}
if(i+lenth<n)
merge(a,temp,i,i+lenth,n-1);
else
for(j=i;j<n;j++)
temp[j]=a[j];
}
void nonrecur_merge(int a[],int n)
{
int lenth=1;
int *temp=(int*)malloc(sizeof(int)*n);
while(lenth<n)
{
merge_pass(a,temp,n,lenth);
lenth*=2;
merge_pass(temp,a,n,lenth);
lenth*=2;
}
free(temp);
}
int findmidloacat(int a[],int left,int right)
{
int mid=(left+right)/2;
if(a[left]>a[mid])
swap(&a[left],&a[mid]);
if(a[left]>a[right])
swap(&a[left],&a[right]);
if(a[mid]>a[right])
swap(&a[mid],&a[right]);
swap(&a[mid],&a[right-1]);
return a[right-1];
}
void tempqsort(int a[],int left,int right)
{
int flag,cutoff,low,high;
cutoff=99;
if(cutoff<right-left)
{
flag=findmidloacat(a,left,right);
low=left;
high=right-1;
while(1)
{
while(a[++low]<flag);
while(a[--high]>flag);
if(low<high)
swap(&a[low],&a[high]);
else break;
}
swap(&a[low],&a[right-1]);
tempqsort(a,left,low-1);
tempqsort(a,low+1,right);
}
else
bubble_sort(a+left,right-left+1);
}
void Qsort(int a[],int n)
{
tempqsort(a,0,n-1);
}
int main()
{
int i,N;
scanf("%d",&N);
int a[N];
for(i=0;i<N;i++)
scanf("%d",&a[i]);
Qsort(a,N);
for(i=0;i<N-1;i++)
printf("%d ",a[i]);
printf("%d",a[i]);
}