package main

import (
	"fmt"
	"strconv"
)

func main() {
	var K int
	fmt.Scan(&K)

	step := 0
	for n := 1; ; n++ {
		nstr := strconv.Itoa(n)
		var S int
		for i := 0; i < len(nstr); i++ {
			digit, _ := strconv.Atoi(nstr[i : i+1])
			S += digit
		}
		if n/S == step {
			fmt.Printf("%4d\n", n/S)
		}
		if n/S == step+1 {
			fmt.Printf("%4d\n", n/S)
			step++
			if step == K {
				return
			}
		}
	}

	return
}
