require'csv' CSV.parse(gets p){|r|i=0 r.map{|c|puts"#$. #{i+=1} #{c}".gsub$/,'\n'} $.+=1}