#main
h = Hash.new
h.default = 0
arr = Array.new
while n = gets
  arr << n.to_i
end
arr.each do |i|
  h[i] += 1
end
g = h.to_a.sort{|a, b| b[1] <=> a[1]}
i = 0
f = Array.new
while g[0][1] == g[i][1]
  f << g[i][0]
  i += 1
end
puts f.sort.join("\n")