n = int(input()) dic ={} for i in range(n): eye = input().count("^") if eye in dic: dic[eye] += 1 else: dic[eye] = 1 maxd = max(dic.items(), key=lambda x: x[1]) print(maxd[0])