#include <stdio.h>
void quick(int* a,int left,int right)
{
if(left >= right)
return ;
int tmp=a[left];
int i=left;
int j=right;
while(i<j)
{
while(j>i&&a[j]>=tmp)
j--;
int t = a[j];
a[j]=a[i];
a[i]=t;
while(i<j&&a[i]<=tmp)
i++;
t = a[j];
a[j]=a[i];
a[i]=t;
}
quick(a,left,i-1);
quick(a,i+1,right);
}
int main()
{
int a[100];
int n;
while(scanf("%d",&n)!=EOF)
{
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
quick(a,0,n-1);
for(int i=0;i<n;i++)
{
printf("%d ",a[i]);
}
printf("\n");
}
return 0;
}