#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

K = get_int

# X = 1.step(1000000).map do |n|
#   [n, (n.to_f/ n.to_s.split('').map(&:to_i).sum)]
# end
#
# X.sort! { |a, b| a[1] <=> b[1] }
# xx = []
# max = 0
# X.each do |x|
#   if x[0] > max
#     xx << x
#     max = x[0]
#   end
# end

x = 1
def next_x(x)
  if x.to_s.length < 4
    x+1
  else
    a = x.to_s.split('')[0..2].join.to_i
    ((a+1).to_s + ('9' * (x.to_s.length - 3))).to_i
  end
end

x = 1
ans = [1]
while x <= 10 ** 15
  x = next_x(x)
  ans << x
end

ans.map! { |n| [n,(n.to_f/ n.to_s.split('').map(&:to_i).sum)] }
ans.sort! do |a, b|
  if (a[1] <=> b[1]) == 0
    a[0] <=> b[0]
  else
    a[1] <=> b[1]
  end
end

xx = []
max = 0
ans.each do |x|
  if x[0] > max
    xx << x
    max = x[0]
  end
end

K.times do |i|
  puts ans[i][0]
end
