N = gets.to_i D = N.times.map { gets.to_i } D.each do |d| if d == 1 puts 10 else puts ('9' * d).to_i - 10 ** (d - 1) + 1 end end