let rec loop () = match begin try Some (read_line ()) with End_of_file -> None end with | Some s -> print_endline s; loop () | None -> ()