#include <iostream>
using namespace std;
const int N = 1010;
int a[N];
int n;
void insert_sort(int a[], int n)
{
if(n <= 1) return ;
insert_sort(a, n - 1);
int v = a[n - 1];
int j = n - 2;
while(j >= 0 && a[j] > v)
{
a[j + 1] = a[j];
j -- ;
}
a[j + 1] = v;
}
int main()
{
cin >> n;
for(int i = 0; i < n; i ++ ) scanf("%d", &a[i]);
insert_sort(a, n);
for(int i = 0; i < n; i ++ ) printf("%d ", a[i]);
return 0;
}