let read_lines () =
  let rec iter xs =
    try
      read_line() :: xs |> iter
    with End_of_file -> xs
  in iter []

let rec print_until n xs =
  print_int (List.hd xs);
  print_newline ();
  if n > 1 then
    print_until (n-1) (List.tl xs)
  else ()

let _ = read_lines()
        |> List.map int_of_string
        |> List.sort compare
        |> List.rev
        |> print_until 3