def a(n)
  sum = 0
  n.to_s.split("").each do |j|
    sum+=j.to_i
  end
  sum
end
n = gets.strip.to_i
i = 1
count = 0
while count != n
  if a(i) >= a(i + 1) || i < 10
    p i
    count+=1
  end
  i+=1
end
