arg = []
while (get = gets)
  arg << get.to_i
end
max = 0
suspection = []
temp = 0
count = 0
arg.sort.each{|i|
  if temp == i
    count += 1
    if max < count
      suspection = [i]
      max = count
    elsif max == count
      suspection << i
    end
  else
    temp = i
    count = 1
  end}
puts suspection