#include<stdio.h>
#define MAX 10000

int main(){
  int n, i, j, k;
  unsigned short A[2000001], B[2000001], C[MAX + 1] = {0};
  
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    scanf("%d", &A[i]);

  /*for(i = 0; i < n; i++)
    printf("%d ", A[i]);
    printf("\n");*/
  
  for(i = 0; i < n; i++)
    C[A[i]]++;

  /*for(i = 0; i <= 10; i++){
    printf("C[%d] = %d\n", i, C[i]);

    }
    printf("\n");*/

  //printf("C[0] = %d\n", C[0]);
 
  for(i = 1; i <= MAX; i++){
    C[i] = C[i] + C[i - 1];
    //printf("C[%d] = %d\n", i, C[i]);
  }

  /*for(i = 0; i <= n; i++){
    printf("i = %d, C[%d] = %d\n", i, i, C[i]);
    }*/

  for(j = n - 1; j >= 0; j--){
    B[C[A[j]]] = A[j];
    //printf("B[C[A[%d]]] = %d, A[%d] = %d\n", j, B[C[A[j]]], j, A[j]);
    //printf("c[a[%d]] = %d \t = > \t", j, C[A[j]]);
    C[A[j]]--;
    //printf("c[a[%d]] = %d\n", j, C[A[j]]);

  }
  
  for(i = 1; i < n; i++)
    printf("%d ", B[i]);
  printf("%d\n", B[n]);

  return 0;
}