k = gets.to_i

def is_snuke(n)
    s = 0
    m = n
    while m > 0
        s += m % 10
        m /= 10
    end
    n / s == 1
end

i = 1
cnt = 0
while cnt < k do
    if is_snuke(i)
        cnt += 1
        puts i
    end
    i += 1
end
