# coding: utf-8 # Your code here! import collections n = int(input()) a = [] for i in range(n): s = str(input()) eye = s[1:-1] a.append(len(eye)) c = collections.Counter(a) m = c.most_common(1)[0][0] print(m)