import sys

import math

import itertools as it

def i():return int(sys.stdin.readline().replace("\n",""))

def i2():return list(map(int,sys.stdin.readline().replace("\n","").split()))

def s():return str(sys.stdin.readline().replace("\n",""))

def l():return list(sys.stdin.readline().replace("\n",""))

def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]

def lx():return list([int(x)*-1 for x in sys.stdin.readline().replace("\n","").split()])

def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))



if __name__ == "__main__":pass

n = i()

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

s.sort()

ss = list(set(s))

ss.sort()

a = [0]*len(ss)

i = 0

j = 0

while n-1 > i:

    if s[i] == s[i+1]:

        a[j] += 1

        i += 1

    else:

        i += 1

        j += 1

m = max(a)

for k in range(len(a)):

    if m == a[k]:

        print((ss[k]))

def i():

	return int(eval(input()))

def i2():

	return list(map(int,input().split()))

def s():

	return str(eval(input()))

def l():

	return list(eval(input()))

def intl():

	return list(int(k) for k in input().split())



n = i()

#s = {s():0 for _ in range(n)}



a = {}

for i in range(n):

	s = eval(input())

	try:

		a[s] += 1

	except KeyError:

		a[s] = 1

b = sorted(list(a.items()),key = lambda x:x[0])



memo = max([i[1] for i in list(a.items())])

for i in b:

	"""print(i,"i")

	print(i[0],"i[0]")

	print(i[1],"i[1]")

	print(max(b)[0],"max(b)[0]")"""

	if i[1] == memo:

		print((i[0]))

import sys
import math
import itertools as it


def i():
    return int(sys.stdin.readline().replace("\n", ""))


def i2():
    return list(map(int, sys.stdin.readline().replace("\n", "").split()))


def s():
    return str(sys.stdin.readline().replace("\n", ""))


def l():
    return list(sys.stdin.readline().replace("\n", ""))


def intl():
    return [int(k) for k in sys.stdin.readline().replace("\n", "").split()]


def lx():
    return list([int(x) * -1 for x in sys.stdin.readline().replace("\n", "").split()])


def t():
    return tuple(map(int, sys.stdin.readline().replace("\n", "").split()))


if __name__ == "__main__":
    pass
n = i()
s = [eval(input()) for _ in range(n)]
s.sort()
ss = list(set(s))
ss.sort()
a = [0] * len(ss)
i = 0
j = 0
while n - 1 > i:
    if s[i] == s[i + 1]:
        a[j] += 1
        i += 1
    else:
        i += 1
        j += 1
m = max(a)
for k in range(len(a)):
    if m == a[k]:
        print((ss[k]))

def i():
    return int(eval(input()))


def i2():
    return list(map(int, input().split()))


def s():
    return str(eval(input()))


def l():
    return list(eval(input()))


def intl():
    return list(int(k) for k in input().split())


n = i()
# s = {s():0 for _ in range(n)}
a = {}
for i in range(n):
    s = eval(input())
    try:
        a[s] += 1
    except KeyError:
        a[s] = 1
b = sorted(list(a.items()), key=lambda x: x[0])
memo = max([i[1] for i in list(a.items())])
for i in b:
    """print(i,"i")
    print(i[0],"i[0]")
    print(i[1],"i[1]")
    print(max(b)[0],"max(b)[0]")"""
    if i[1] == memo:
        print((i[0]))

-import sys -import math -import itertools as it - - -    return int(sys.stdin.readline().replace("\n", "")) +    return int(eval(input())) -    return list(map(int, sys.stdin.readline().replace("\n", "").split())) +    return list(map(int, input().split())) -    return str(sys.stdin.readline().replace("\n", "")) +    return str(eval(input())) -    return list(sys.stdin.readline().replace("\n", "")) +    return list(eval(input())) -    return [int(k) for k in sys.stdin.readline().replace("\n", "").split()] +    return list(int(k) for k in input().split()) -def lx(): -    return list([int(x) * -1 for x in sys.stdin.readline().replace("\n", "").split()]) - - -def t(): -    return tuple(map(int, sys.stdin.readline().replace("\n", "").split())) - - -if __name__ == "__main__": -    pass -s = [eval(input()) for _ in range(n)] -s.sort() -ss = list(set(s)) -ss.sort() -a = [0] * len(ss) -i = 0 -j = 0 -while n - 1 > i: -    if s[i] == s[i + 1]: -        a[j] += 1 -        i += 1 -    else: -        i += 1 -        j += 1 -m = max(a) -for k in range(len(a)): -    if m == a[k]: -        print((ss[k])) +# s = {s():0 for _ in range(n)} +a = {} +for i in range(n): +    s = eval(input()) +    try: +        a[s] += 1 +    except KeyError: +        a[s] = 1 +b = sorted(list(a.items()), key=lambda x: x[0]) +memo = max([i[1] for i in list(a.items())]) +for i in b: +    """print(i,"i") +    print(i[0],"i[0]") +    print(i[1],"i[1]") +    print(max(b)[0],"max(b)[0]")""" +    if i[1] == memo: +        print((i[0]))