#include<stdio.h>
#define MAX 2000001
#define  VMAX   10000
void countingsort(int*, int);

int a[MAX - 1];
int count[VMAX + 1];
int main(void) {
	int i, n;
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a[i]);
	}

}
void countingsort(int a[], int b[] ,int n){
	int  i, n, b[MAX-1];
	
	for (i = 0; i <= VMAX; i++) {
		count[i] = 0;
	}

	for (i = 0; i < n; i++) {
		count[a[i]]++;
	}

	for (i = 1; i < VMAX; i++) {
		count[i] = count[i]+count[i-1];
	}

	for (i = n ; i > 0; i--) {
		b[count[a[i]]] = a[i];
		count[a[i]]--;
	}
	for (i = 0; i < n-1; i++) {
		printf("%d ",a[i]);
	}
	printf("%d\n", a[n - 1]);
}
