k = int(input())

footer = ""
footer_sub = ""
flag_num = -1
count = 0
while True:
    for i in range(1, 10):
        if i <= flag_num:
            for j in range(9):
                print(str(i) + str(j) + footer_sub)
                count += 1
                if count >= k:
                    exit()
        print(str(i) + footer)
        count += 1
        if count >= k:
            exit()
    
    footer += "9"
    footer_sub = footer[:-1]
    flag_num += 1