number=[]

while i = STDIN.gets
	if i == "\n"
		break
	end
	number.push(i.to_i)
end

mod=[]
for x in 0..number.size
	mod.push(number.count(number[x]))
end

answer=[]

for y in 0..number.size
	if number.count(number[y]) == mod.max
		answer.push(number[y])
	end
end

puts answer.sort.uniq