def mode_value(arr)
  n, mv = 0, []
  
  100.times do |i|
    if n < arr[i]
      n, mv = arr[i], [i + 1]
    elsif n == arr[i]
      mv << i + 1
    end
  end
  
  return mv
end

arr = Array.new(100, 0)

arr[$_.to_i - 1] += 1 while gets

puts mode_value(arr)