k = gets.to_i
count = 0
nine_count = 0
while true
    tail = "9"*nine_count
    (1..9).each do |i|
        print i
        puts tail
        count += 1
        if count == k
            exit
        end
    end
    nine_count += 1
end