from collections import defaultdict
Poll_Dict = defaultdict(int)

N = int(input())

for _ in range(N):
    Poll_Dict[str(input())] += 1

Max_Number = max(Poll_Dict.values())    
Max_List = sorted([k[0] for k in Poll_Dict.items() if k[1] == Max_Number])

for i in Max_List:
    print(i) from collections import defaultdict Poll_Dict = defaultdict(int) Poll_Dict defaultdict(int) defaultdict int N = int(input()) N int(input()) int input() input for _ in range(N):
    Poll_Dict[str(input())] += 1 _ range(N) range N Poll_Dict[str(input())] += 1 Poll_Dict[str(input())] Poll_Dict str(input()) str input() input 1 Max_Number = max(Poll_Dict.values()) Max_Number max(Poll_Dict.values()) max Poll_Dict.values() Poll_Dict.values Poll_Dict values k[0] for k in Poll_Dict.items() if k[1] == Max_Number for k in Poll_Dict.items() if k[1] == Max_Number k Poll_Dict.items() Poll_Dict.items Poll_Dict items k[1] == Max_Number k[1] k 1 Max_Number if k[1] == Max_Number k[0] k 0 Max_List = sorted([k[0] for k in Poll_Dict.items() if k[1] == Max_Number]) Max_List sorted([k[0] for k in Poll_Dict.items() if k[1] == Max_Number]) sorted [k[0] for k in Poll_Dict.items() if k[1] == Max_Number] for i in Max_List:
    print(i) i Max_List print(i) print i Max_Number = max(Poll_Dict.values()) max(Poll_Dict.values()) Max_Number Poll_Dict = defaultdict(int) defaultdict(int) Poll_Dict N = int(input()) int(input()) N Max_List = sorted([k[0] for k in Poll_Dict.items() if k[1] == Max_Number]) sorted([k[0] for k in Poll_Dict.items() if k[1] == Max_Number]) Max_List
from collections import defaultdict
Poll_Dict = defaultdict(int)

N = int(input())

for _ in range(N):
    Poll_Dict[str(input())] += 1

Max_Number = max(Poll_Dict.values())    
Max_List = sorted([k[0] for k in Poll_Dict.items() if k[1] == Max_Number])

for i in Max_List:
    print(i)