# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
lis=[SI() for i in range(n)]
c=Counter(lis)
mx=0
for x in c.keys():
    if c[x]>mx:
        mx=c[x]
answers=[]
for x in c.keys():
    if c[x]==mx:
        answers.append(x)
answers.sort()
for x in answers:
    print(x) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 from collections import Counter, deque from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from heapq import heapify, heappop, heappush from math import floor, ceil,pi,factorial from operator import itemgetter def I(): return int(input()) I def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) LI int(input()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) int(input()) int input() input def LI2(): return [int(input()) for i in range(n)] LI2 [LI()]for i in range(n) for i in range(n) i range(n) range n for i in range(n) [LI()] LI() LI def MXI(): return [[LI()]for i in range(n)] MXI def SI(): return input().rstrip() SI def printns(x): print('\n'.join(x)) printns x x def printni(x): print('\n'.join(list(map(str,x)))) printni x x inf = 10**17 inf 10**17 10 17 mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 n=I() n I() I SI() for i in range(n) for i in range(n) i range(n) range n for i in range(n) SI() SI lis=[SI() for i in range(n)] lis [SI() for i in range(n)] c=Counter(lis) c Counter(lis) Counter lis mx=0 mx 0 for x in c.keys():
    if c[x]>mx:
        mx=c[x] x c.keys() c.keys c keys if c[x]>mx:
        mx=c[x] c[x]>mx c[x] c x mx mx=c[x] mx c[x] c x answers=[] answers [] for x in c.keys():
    if c[x]==mx:
        answers.append(x) x c.keys() c.keys c keys if c[x]==mx:
        answers.append(x) c[x]==mx c[x] c x mx answers.append(x) answers.append answers append x answers.sort() answers.sort answers sort for x in answers:
    print(x) x answers print(x) print x def MXI(): return [[LI()]for i in range(n)] def MXI(): return [[LI()]for i in range(n)] MXI mx=c[x] c[x] mx answers=[] [] answers def printni(x): print('\n'.join(list(map(str,x)))) def printni(x): print('\n'.join(list(map(str,x)))) printni mod = 10**9 + 7 10**9 + 7 mod def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI n=I() I() n def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI mx=0 0 mx def SI(): return input().rstrip() def SI(): return input().rstrip() SI inf = 10**17 10**17 inf def printns(x): print('\n'.join(x)) def printns(x): print('\n'.join(x)) printns input = sys.stdin.readline sys.stdin.readline input def I(): return int(input()) def I(): return int(input()) I def LI2(): return [int(input()) for i in range(n)] def LI2(): return [int(input()) for i in range(n)] LI2 c=Counter(lis) Counter(lis) c lis=[SI() for i in range(n)] [SI() for i in range(n)] lis
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
lis=[SI() for i in range(n)]
c=Counter(lis)
mx=0
for x in c.keys():
    if c[x]>mx:
        mx=c[x]
answers=[]
for x in c.keys():
    if c[x]==mx:
        answers.append(x)
answers.sort()
for x in answers:
    print(x)