#include<stdio.h>
#define MAX 2000001
#define VMAX 10000

int A[MAX],B[MAX],C[VMAX+1];

int main()
{
 
  int k,i,j,n=0;

 
  scanf("%d",&k);
  for(i = 0;i < k;i++) 
    {
      scanf("%d",&A[i]);
      if(n < A[i])n = A[i];
    }
  for(i = 0;i <= n;i++)C[i]=0;

  for(j = 0;j < k;j++)C[A[j]]++;
 
  for(i = 1;i <= n;i++)C[i] = C[i]+C[i-1];
 
  for(j = k-1;j >= 0;j--)
    { 
      B[C[A[j]]] = A[j];
      C[A[j]]--;      
    }
  return 0;
}