# frozen_string_literal: true n = gets.chomp.to_i ss = [] n.times { ss << gets.chomp.size - 2 } p ss.group_by(&:itself).max_by { |_, v| v.size }.first # ref: https://osa.hatenablog.com/entry/2014/12/21/122603