import collections n=int(input()) ls=[] for i in range(n): ls.append(input()) cnt=0 cls=[] for j in range(n): for i in range(len(ls[j])): if ls[j][i]=="^": cnt=cnt+1 if ls[j][i]==")": cls.append(cnt) cnt=0 c=collections.Counter(cls) mx=0 for num,cont in c.most_common(): if mx