let () =
  let values = Array.init 101 (fun x -> 0) in
  let rec read () =
    try let n = read_int () in
        values.(n) <- values.(n)+1;
        read ()
    with End_of_file ->
      let rec get_mode l = function
          0 -> l
        | i -> if l = [] || snd (List.hd l) < values.(i) then
                 get_mode [(i,values.(i))] (i-1)
               else if snd (List.hd l) = values.(i) then
                 get_mode ((i,values.(i))::l) (i-1)
               else
                 get_mode l (i-1)
      in
      let mode = get_mode [] 100 in
      let rec print_mode = function
          [] -> ()
        | h::t -> Printf.printf "%d\n" (fst h);print_mode t
      in print_mode mode
  in read ()
;;