s = Array.new(3) { gets.chomp } puts s.tally.max_by { |_k, v| v }[0]