N = gets.chomp.to_i

if N < 10 then
  for i in 1..N do
    puts i
  end
  exit
end

for i in 1..9 do
  puts i
end

restN = N - 9
digit = 1

loop do
  for i in 1..9 do
    exit if restN == 0
    puts "#{i}#{'9' * digit}"
    restN -= 1
  end
  digit += 1
end