n = int(input()) s = [input() for i in range(n)] memo = {} for i in range(n): tmp = len(s[i]) - 2 if tmp not in memo: memo[tmp] = 1 else: memo[tmp] += 1 ans = 0 ans_num = 0 for num in memo: if memo[num] >= ans_num and num > ans: ans_num = memo[num] ans = num print(ans)