object Main extends App {
  val n: Int = io.StdIn.readLine().toInt
  val buf: mutable.ArrayBuffer[Int] = mutable.ArrayBuffer.empty[Int]
  val (x, len) = ((0,0) /: io.StdIn.readLine()){(n, c) =>
    if (c == ' ') {buf += n._1; (0, if (n._1 > n._2) n._1 else n._2)}
    else (n._1*10 + c.toInt-48, n._2)
  }
  val arr: Array[Int] = (buf += x).toArray
  val count: Array[Int] = Array.fill(len+1)(0)
  val result: Array[Int] = Array.fill(n)(0)

  for (i <- arr) count(i) += 1
  for (i <- 1 until count.length) count(i) += count(i-1)
  for (i <- n-1 to 0 by -1) {
    result(count(arr(i))-1) = arr(i)
    count(arr(i)) -= 1
  }

  println(result.mkString(" "))
}