n = int(input()) count = {} for i in range(n): eyes = input().count('^') if eyes in count: count[eyes] += 1 else: count[eyes] = 1 maximum = 0 ans = 0 for k, v in sorted(count.items()): if v >= maximum: maximum = v ans = k print(ans)