let rec read_byte (i, last) = try let x = input_char stdin in if (String.length i) > 0 && (last = x) then read_byte (i, last) else read_byte (i ^ (String.make 1 x), x) with | End_of_file -> i;; read_byte ("", '\x00') |> print_string; print_newline ();;