N = 100

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

arr = Array.new(N, 0)


while line = gets
  arr[line.to_i - 1] += 1
end

mode_value(arr).each do |v|
  puts v
end