#include<stdio.h>
#include<stdlib.h>
#define MAX 2000001
#define SIZE 10001

int main() {
    int n, i, j;
    int C[SIZE];
    //??????????????§???????????????????????????:(
    //A[MAX], B[MAX];

    unsigned short *A, *B;
    A = malloc(sizeof(short) * n+1);
    B = malloc(sizeof(short) * n+1);

    scanf("%d", &n);
    
    for (i = 0; i < n; i++) scanf("%d", &A[i]);

    for (i = 0; i < SIZE; i++) C[i] = 0;

    for (j = 1; j < n; j++) C[A[j]]++;

    for (i = 1; i < SIZE; i++) C[i] = C[i] + C[i-1];

    for (j = n; j > 0; j--) {
	B[C[A[j]]] = A[j];
	C[A[j]]--;
    }

    for (i = 0; i < n; i++) {
	if (i) printf(" ");
	printf("%d", B[i]);
    }
    return 0;

}