package main

import (
	"io"
	"os"

	"fmt"

	"strconv"
)

func pow(x int, b int, n int) int {
	if n == 0 {
		return 1
	}
	if n == 1 {
		return x
	}

	return pow(x*b, b, n-1)
}

func S(ns string) int {
	sum := 0
	for _, c := range string(ns) {
		i, _ := strconv.Atoi(string(c))
		sum += i
	}

	return sum
}

func Solve(in io.Reader, out io.Writer) {
	var ks string
	fmt.Fscan(in, &ks)
	k, _ := strconv.Atoi(ks)

	max_is := ""
	max := 0
	a := 1
	for i := 1; k > 0; i += a {
		is := strconv.Itoa(i)
		x := S(is)
		if x <= max {
			continue
		}

		max = x
		if len(is) > len(max_is) {
			max_is = is
			a = pow(10, 10, len(is)-1)
		}
		fmt.Fprintln(out, i)
		k--
	}
}

func main() {
	Solve(os.Stdin, os.Stdout)
}
