//config = { input: 'tmp', newline: '\r\n' }; // win
config = { input: '/dev/stdin', newline: '\n' }; // linux

line = require('fs').readFileSync(config.input, 'ascii')
  .split(config.newline, 2);

A = line[1].split(' ').map(Number);
B = [].concat(A);

k = A.reduce(function (p, c) { return (c > p) ? c : p; }, 0);

sort(A, B, k);

console.log(B.join(' '));

function sort(A, B, k) {
  var C, i;

  C = [];
  for (i = 0; i <= k; i++) C.push(0);

  for (i in A) C[A[i]]++;

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

  for (i = A.length - 1; i >= 0; i--) {
    B[C[A[i]]-1] = A[i];
    C[A[i]]--;
  }
}