import collections a=int(input()) b=[] for i in range(a): c=input() b.append(c.count('^')) print(b) d=collections.Counter(b) print(d.most_common()[0][0])