let inputString = '';

process.stdin.on('data', inputStdin => {
  inputString += inputStdin;
});
process.stdin.on('end', function() {
  const inputArr = inputString.replace(/\s*$/, '')
    .split('\n')
    .map(str => str.replace(/\s*$/, ''));

  const result = countingSort(inputArr[1].split(' ').map(s => Number(s)), MAX_K);
  console.log(result.join(' '));
});

const MAX_K = 10000;
const countingSort = (arr, maxNum) => {
  const C = Array(maxNum + 1).fill(0);

  for (let j=0; j<arr.length; j++) {
    C[arr[j]]++;
  }

  for (let i=1; i<=maxNum; i++) {
    C[i] = C[i] + C[i-1];
  }

  const B = Array(arr.length);
  for (let j=arr.length-1; j>=0; j--) {
    const value = arr[j];
    const freqOfLessOrEqual = C[value];
    const index = freqOfLessOrEqual - 1;
    B[index] = value;
    C[value]--; // for duplicated numbers
  }

  return B;
};
