n=int(input()) l=[0]*1200 for i in range(n): s=input() l[len(s)]+=1 m=-1 index=-1 for i in range(1001): if l[i]>=m: m=l[i] index=i-2 print(index)