#include <iostream>
using namespace std;
int main()
{
int n,sum,r,a[1000],b[1000];
int i,j,k,l;
while (cin>>n)
{
for (i=1;i<=n;i++)
{
cin>>r;
a[i]=r;
b[i]=-1;
}
for (j=1;j<=n;j++)
{
sum=1;
for (k=1;k<=n;k++)
{
if (a[k]<a[j]) sum++;
}
while (b[sum]!=-1){sum++;}
b[sum]=a[j];
}
for (l=1;l<=n;l++)
{
cout<<b[l]<<" ";
}
cout<<"\n";
}
}