#include<stdio.h>
#include<stdlib.h>
int a[100000],n;
void s(int head,int tail)
{
int base = head,i,j,box;
while(head<tail)
{
for(i = head;a[i]>base;i)
{
i++;
}
for(j = head;a[j]<base;j)
{
j--;
}
box = a[j];
a[j] = a[i];
a[i] = box;
if(i>=j)
{
box = a[head];
a[head] = a[i];
a[i] = box;
}
}
s(head,i-1);
s(i+1,tail);
}
int main(void)
{
scanf("%d",&n);
for(int i = 0;i<n;i++)
{
scanf("%d",a+i);
}
s(0,n-1);
for(int i = 0;i<n;i++)
{
printf("%d",a[i]);
}
return 0;
}