let rec pow_int a n = if n <= 0 then 1 else a * pow_int a (n-1)
let rec sum_dig x = if x = 0 then x else x mod 10 + sum_dig (x/10)
let rec digs x = if x = 0 then 0 else 1 + digs (x/10)
let s x = float_of_int x /. float_of_int (sum_dig x)

let () =
  Scanf.scanf "%d" @@ fun k ->
  let rec loop c n =
    if c >= k then []
    else
      Array.init (digs n) (fun i ->
        let m = pow_int 10 (i+1) in
        (n / m + 1) * m - 1)
      |> Array.fold_left (fun v x -> if s x < s v then x else v) n
      |> fun n' -> n' :: loop (c+1) (n'+1)
  in
  loop 0 1 |> List.iter (Printf.printf "%d\n")