import scala.io.StdIn.{readInt, readLine}
object Main {
    def main(args: Array[String]): Unit = {
        readInt
        val arr = readLine.split(" ").map(_.toInt)
        println(countingSort(arr).mkString(" "))
    }
    def countingSort(arr: Array[Int]): Array[Int] = {
        val count = new Array[Int](10001)
        val ret = new Array[Int](arr.length)
        arr.foreach { i => count(i) = count(i) + 1}
        (0 until count.length).foldLeft(0) { (sum, i) => 
            count(i) = sum + count(i)
            count(i)
        }
        arr.reverse.foreach { i =>
            count(i) -= 1
            ret(count(i)) = i
        }
        ret
    }
}
