# 1~9, 19, 199, 1999, 19999,...
# なんも考察してなくて4桁くらいまで適当にピックしたやつを手計算して眺めてた結果
k = gets.chomp.to_i
arr = (1..9).to_a+[19, 199, 1999, 19999, 199999, 1999999, 19999999, 199999999, 1999999999, 19999999999, 199999999999, 1999999999999]
if k<18
  arr = arr[0, 10]
elsif k<198
  arr = arr[0, 11]
elsif k<1998
  arr = arr[0, 12]
elsif k<19998
  arr = arr[0, 13]
elsif k<199998
  arr = arr[0, 14]
elsif k<1999998
  arr = arr[0, 15]
elsif k<19999998
  arr = arr[0, 16]
elsif k<199999998
  arr = arr[0, 17]
elsif k<1999999998
  arr = arr[0, 18]
elsif k<19999999998
  arr = arr[0, 19]
elsif k<199999999998
  arr = arr[0, 20]
elsif k<1999999999998
  arr = arr[0, 21]
elsif k<19999999999998
  arr = arr[0, 22]
elsif k<199999999999998
  arr = arr[0, 23]
end
arr.each do |a|
  puts a
end
