n = int(input()) l = [ ] for i in range(n): x = input().count('^') l.append(x) l2 = [] for i in l: y = l.count(i) l2.append([y, i]) print(sorted(l2)[::-1][0][1])