let rec read l x = match x with
    0 -> l
  | i ->
     let n = read_int () in
     read (n::l) (i-1);;

let m = read [] 10 |> List.sort compare |> List.rev in
    for i=0 to 2 do
      List.nth m i |> print_int;
      print_newline ();
    done;;