/*
#include<stdio.h>
int bs(int s, int e, int k)
{
int mid=(s+e)/2;
if(s>e) return -1;
if(a[mid]==k) return mid;
else if(a[mid]<k) bs(mid+1,e,k);
else bs(s,mid-1,k);
}
int main()
{
int a[50001],b[50001];
int i, j, n, temp;
scanf("%d", &n);
for(i=1; i<=n; i++)
{
scanf("%d", &a[i]);
b[i]=a[i];
}
for(i=1; i<n; i++)
{
for(j=1; j<=n-i; j++)
{
if (a[j] > a[j+1])
{
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}
}
}
for(i=1; i<=n; i++)
{
printf("%d ",bs(1,n,b[i])-1);
}
}
*/
/*
s=1 e=7 k=50
1 2 3 4 5 6 7
1 15 18 40 49 50 60
*/
// a[i] 23 24 50 54 123
// b[i] 50 23 54 24 123
/*
#include<stdio.h>
int a[100001]={};
int bs(int s, int e, int k)
{
int mid=(s+e)/2;
if(s>e) return -1;
if(a[mid]==k) return mid;
else if(a[mid]<k) bs(mid+1,e,k);
else bs(s,mid-1,k);
}
int main()
{
int i, j, n, m,t;
scanf("%d", &n);
for(i=1;i<=n;i++)
{
scanf("%d", &a[i]);
}
scanf("%d", &m);
for(i=1;i<=m;i++)
{
scanf("%d", &t);
printf("%d ",bs(1,n,t));
}
}
*/
int a[100001]= {};
void quick_sort(int s, int e)
{
int temp;
int pivot=s;
int low=s,high=e;
if(s>=e)
return ;
while(low<high)
{
while(a[pivot]>a[low])
low++;
while(a[pivot]<a[high])
high--;
if(low<high)
{
temp = a[low];
a[low] = a[high];
a[high] = temp;
}
}
temp = a[pivot];
a[pivot] = a[high];
a[high] = temp;
quick_sort(s,high-1);
quick_sort(high+1,e);
}
int main()
{
int i, n;
scanf("%d", &n);
for(i=1;i<=n;i++)
{
scanf("%d", &a[i]);
}
quick_sort(1,n);
for(i=1;i<=n;i++)
{
printf("%d ",a[i]);
}
}