from collections import Counter d = Counter(s.count("^") for s in open(0).read().split()) print(sorted(sorted(d.items()),key=lambda x:x[1])[-1][0])