str = "" gets.chomp.to_i.times { str += gets.chomp } puts str