def s(x):
    a = str(x)
    b = 0
    for k in range(len(a)):
        b += int(a[k])
    return b

k = int(input())
cnt = 0
i = 1

while cnt < k:
    c = 0
    j = i+1
    while j < i + 10:
        if i/s(i) <= j/s(j):
            c += 1
            j += 1
        else:
            break
    if c == 9:
        print(i)
        cnt += 1
    i += 1
