# frozen_string_literal: true n = gets.chomp.to_i ss = [] n.times { ss << gets.chomp.size - 2 } g = ss.sort.group_by(&:itself).map { |k, v| [k, v.size] } s = g.sort_by { |_k, v| v } p s[-1][0]