gets r=readlines a=[] r.size.times{|i| a << r.map(&:split)[i].map(&:to_i).map(&:succ).max puts "Hitsuji ga #{a[i]} hiki" }