package main

import (
	"fmt"
	"os"
	"strconv"
	"strings"
)

func strintToInt(s string) int {
	i, _ := strconv.Atoi(s)
	return i
}

func calc(n int) float64 {
	sum := 0
	for _, digit := range strings.Split(fmt.Sprintf("%d", n), "") {
		sum += strintToInt(digit)
	}
	return float64(n) / float64(sum)
}

func isSnuk(n int) bool {
	if n < 10 {
		return true
	}
	info := strings.Split(fmt.Sprintf("%d", n), "")
	for i := 1; i < len(info); i++ {
		if info[i] != "9" {
			return false
		}
	}
	return true
}

func main() {
	var K int
	fmt.Scan(&K)
	i := 1
	num := 0
	for {
		if isSnuk(i) {
			fmt.Println(i)
			num += 1
			if num == K {
				os.Exit(0)
			}
		}
		i += 1
	}
}
