#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1e4 + 5, M = 1e4 + 5;
int a[N];
int n;
void show()
{
for(int i = 1; i <= n; i++)
cout << a[i] << ' ';
}
int getIdx(int t)
{
return (t == 0) ? 1 :(t - 1) / 10 + 1;
}
int BA[M / 10 + 1][N];
void bucketSort()
{
for(int i = 1; i <= n; i++)
{
int idx = getIdx(a[i]);
BA[idx][0]++;
BA[idx][BA[idx][0]] = a[i];
}
for(int i = 1, j = 1; j <= M / 10; j++)
{
sort(BA[j] + 1, BA[j] + BA[j][0] + 1);
for(int k = 1; k <= BA[j][0]; k++)
a[i++] = BA[j][k];
}
}
int main()
{
cin >> n;
for(int i = 1; i <= n; i++)
cin >> a[i];
bucketSort();
show();
return 0;
}