n=int(input()) l=[0]*n for i in range(n): l[i]=len(input())-2 s=sorted(list(set(l)),reverse=True) m=[l.count(x) for x in s] print(s[m.index(max(m))])