n = int(input())
S = ['']*n
T = []
for i in range(n):
    S[i] = input()
S.sort()
if n == 1:
    print(S[0])
    exit()
cnt = 1
mxcnt = 1
for i in range(n-1):
    if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
    mxcnt = max(mxcnt,cnt)
cnt = 1
for i in range(n-1):
    if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
    if cnt == mxcnt:
        T.append(S[i])
if mxcnt == 1:
    T.append(S[-1])
for t in T:
    print(t) n = int(input()) n int(input()) int input() input S = ['']*n S ['']*n [''] '' n T = [] T [] for i in range(n):
    S[i] = input() i range(n) range n S[i] = input() S[i] S i input() input S.sort() S.sort S sort if n == 1:
    print(S[0])
    exit() n == 1 n 1 print(S[0]) print S[0] S 0 exit() exit cnt = 1 cnt 1 mxcnt = 1 mxcnt 1 for i in range(n-1):
    if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
    mxcnt = max(mxcnt,cnt) i range(n-1) range n-1 n 1 if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
     S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 cnt += 1 cnt 1 cnt = 1 cnt 1 mxcnt = max(mxcnt,cnt) mxcnt max(mxcnt,cnt) max mxcnt cnt cnt = 1 cnt 1 for i in range(n-1):
    if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
    if cnt == mxcnt:
        T.append(S[i]) i range(n-1) range n-1 n 1 if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
     S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 cnt += 1 cnt 1 cnt = 1 cnt 1 if cnt == mxcnt:
        T.append(S[i]) cnt == mxcnt cnt mxcnt T.append(S[i]) T.append T append S[i] S i if mxcnt == 1:
    T.append(S[-1]) mxcnt == 1 mxcnt 1 T.append(S[-1]) T.append T append S[-1] S -1 for t in T:
    print(t) t T print(t) print t T = [] [] T mxcnt = 1 1 mxcnt cnt += 1 1 cnt cnt += 1 1 cnt mxcnt = max(mxcnt,cnt) max(mxcnt,cnt) mxcnt cnt = 1 1 cnt n = int(input()) int(input()) n cnt = 1 1 cnt S = ['']*n ['']*n S cnt = 1 1 cnt cnt = 1 1 cnt
n = int(input())
S = ['']*n
T = []
for i in range(n):
    S[i] = input()
S.sort()
if n == 1:
    print(S[0])
    exit()
cnt = 1
mxcnt = 1
for i in range(n-1):
    if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
    mxcnt = max(mxcnt,cnt)
cnt = 1
for i in range(n-1):
    if S[i] == S[i+1]:
        cnt += 1
    else:
        cnt = 1
    if cnt == mxcnt:
        T.append(S[i])
if mxcnt == 1:
    T.append(S[-1])
for t in T:
    print(t)