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