from collections import Counter,defaultdict,deque

from heapq import heappop,heappush,heapify

import sys,bisect,math,itertools,fractions,pprint

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))



n = inp()

s = [eval(input()) for i in range(n)]

l = []

d = defaultdict(int)

ss = set()

for i,j in enumerate(s):

    d[j] += 1

for jj in list(d):

    l.append([jj,d[jj]])

l.sort()

l.sort(key=lambda x:x[1],reverse = True)

max = l[0][1]

# print(l,max)

for i,j in enumerate(l):

    if j[1] == max:

        print((j[0]))

    else:

        break

from collections import Counter,defaultdict,deque

from heapq import heappop,heappush

from bisect import bisect_left,bisect_right 

import sys,math,itertools,fractions,pprint

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))



n = inp()

d = []

s = set()

dd = {}

ind = 0

for i in range(n):

    x = eval(input())

    if x in s:

        d[dd[x]][1] += 1

    else:

        dd[x] = ind

        d.append([x,1])

        ind += 1

        s.add(x)

d.sort(key = lambda x:x[1], reverse = True)

# print(d)

res = []

for key,va in d:

    if va < d[0][1]:

        break

    res.append(key)

res.sort()

for x in res:

    print(x)
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
import sys, bisect, math, itertools, fractions, pprint

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


n = inp()
s = [eval(input()) for i in range(n)]
l = []
d = defaultdict(int)
ss = set()
for i, j in enumerate(s):
    d[j] += 1
for jj in list(d):
    l.append([jj, d[jj]])
l.sort()
l.sort(key=lambda x: x[1], reverse=True)
max = l[0][1]
# print(l,max)
for i, j in enumerate(l):
    if j[1] == max:
        print((j[0]))
    else:
        break

from collections import Counter, defaultdict, deque
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
import sys, math, itertools, fractions, pprint

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


n = inp()
d = []
s = set()
dd = {}
ind = 0
for i in range(n):
    x = eval(input())
    if x in s:
        d[dd[x]][1] += 1
    else:
        dd[x] = ind
        d.append([x, 1])
        ind += 1
        s.add(x)
d.sort(key=lambda x: x[1], reverse=True)
# print(d)
res = []
for key, va in d:
    if va < d[0][1]:
        break
    res.append(key)
res.sort()
for x in res:
    print(x)

-from heapq import heappop, heappush, heapify -import sys, bisect, math, itertools, fractions, pprint +from heapq import heappop, heappush +from bisect import bisect_left, bisect_right +import sys, math, itertools, fractions, pprint -s = [eval(input()) for i in range(n)] -l = [] -d = defaultdict(int) -ss = set() -for i, j in enumerate(s): -    d[j] += 1 -for jj in list(d): -    l.append([jj, d[jj]]) -l.sort() -l.sort(key=lambda x: x[1], reverse=True) -max = l[0][1] -# print(l,max) -for i, j in enumerate(l): -    if j[1] == max: -        print((j[0])) +d = [] +s = set() +dd = {} +ind = 0 +for i in range(n): +    x = eval(input()) +    if x in s: +        d[dd[x]][1] += 1 +        dd[x] = ind +        d.append([x, 1]) +        ind += 1 +        s.add(x) +d.sort(key=lambda x: x[1], reverse=True) +# print(d) +res = [] +for key, va in d: +    if va < d[0][1]: +    res.append(key) +res.sort() +for x in res: +    print(x)