data = Array.new
out = Array.new
while input = STDIN.gets
  data.push(input.to_i)
end
data.sort!
out.push([data[0],1])
data.shift
for i in 0.. data.length-1
  if out[out.length-1][0] != data[i]
    out.push([data[i],1])
  else
    out[out.length-1][1] += 1
  end
end
max=0
num = Array.new
for i in 0.. out.length-1
  if out[i][1] > max
    max = out[i][1]
    num = Array.new
    num.push(out[i][0])
  elsif out[i][1] == max
    num.push(out[i][0])
  end
end
puts num.sort!*"\n"