fun main(args: Array<String>){
    val K = readLine()!!.toInt()
    var A = ArrayList<Int>()
    var mim: Int = 0
    var counter = 1
    for (i in 2147483647 downTo 1){
        var Sn = 0
        i.toString().forEach {
            val a: Int = Integer.parseInt(it.toString())
            Sn += a
        }
        val s = i * 100 / Sn
        if (i == 2147483647){
            A.add(0, i)
            mim = Sn
        }else{
            if (Sn <= mim){
                A.add(counter, i)
                mim = Sn
                counter ++
            }
        }
    }
    A.sort()
    for (j in 0 until K){
        println(A[j])
    }
}