K = int(input())

def snuke(val):
    divisor = sum(map(int, list(str(val))))
    return val / divisor

for i in range(1, min(K+1, 9)):
    print(i)

s = 9
if K > 8:
    for i in range(9, K+1):
        if snuke(s) < snuke(s+10):
            print(s)
        s += 10
