fun main(args: Array<String>) {
    val k = readLine()!!.toInt()
    var i = 0
    var n = 1L
    while (i < k) {
        if ((n.toDouble() / s(n).toDouble()) <= ((n + 1).toDouble() / s(n + 1).toDouble())) {
            println(n)
            i++
        }
        n++
    }

}

fun s(n: Long): Long {
    var x = n
    var s = 0L
    while (x > 0) {
        s += x % 10
        x /= 10
    }
    return s
}