n = int(input()) eye_dic = {} max_eye = 0 max_count = 0 for i in range(n): eye = len(input())-2 eye_dic.setdefault(eye,0) eye_dic[eye] += 1 if eye_dic[eye]>max_count: max_count = eye_dic[eye] max_eye = eye elif eye_dic[eye]==max_count: max_eye = max(max_eye,eye) print(max_eye)