N = int(input()) src = [input() for i in range(N)] ctr = [0] * 1005 for s in src: ctr[len(s)-2] += 1 ans = None c = 0 for i in range(1004,-1,-1): if ctr[i] > c: c = ctr[i] ans = i print(ans)