object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val k = sc.nextInt

    Stream.from(1).filter(isSunuke).take(k).foreach(println)
  }

  def s(n: Int): Int = n.toString.map(_.toString.toInt).sum
  def isSunuke(n: Int): Boolean = {
    val m0 = if(n % 10 == 9) n + 1 else n
    val m = m0 - (m0 % 10) + 9
    n * s(m) <= m * s(n)
  }
}
