K = gets.to_i

def f(i)
  i.to_f / i.to_s.split('').map(&:to_i).inject{|acc, x| acc + x}
end

ans = []
min = f(1000 - 1)
999.downto(1).each do |i|
  tmp = f(i)
  if tmp <= min
    ans << i
    min = tmp 
  end 
end

base = 10000
min = f(base - 1)
while ans.size < K
  (base - 1).step(base / 10, -(base / 100)).each do |i|
    tmp = f(i) 
    if tmp <= min
      ans << i
      min = tmp 
    end 
  end
  base *= 10
  min = f(base - 1)
end 

puts ans.sort[0, K]
