n=int(input()) MAX=1000 c=[0]*MAX for i in range(n): s=input() c[len(s)-2]+=1 print(max((c[i],i) for i in range(MAX))[1])