
let _ = 
  let ar = Array.make 101 0 in
  try
    while true do
      let n = read_int () in
      ar.(n) <- ar.(n) + 1
    done
  with
    End_of_file -> 
    let mx = ref 0 in
    let idx = ref [] in
    Array.iteri (fun i x -> if x = !mx then idx := i :: !idx else if x > !mx then (mx := x; idx := [i]) else ()) ar;
    List.iter (Printf.printf "%d\n") @@ List.rev !idx