N = gets.to_i guess = Array.new(10, 0) N.times do turn = gets.split point = (turn.pop == "YES") ? 1 : -1 turn.each do |n| guess[n.to_i] += point end end puts guess.index(guess.max)