open Batteries
open Printf
let () =
  let k = Scanf.scanf "%d " (fun a -> a) in


  let rec aux i dx cnt res =
    let dx,cnt = if cnt = (if dx >= 100 then dx/10+9 else 9) then dx*10, 0 else dx,cnt in
    let res = res + dx in
    Printf.printf "%d\n" res;
    if i = k then () else 
      aux (i+1) dx (cnt+1) res
  in

  aux 1 1 0 0
