open System let arg = Console.ReadLine() let separate (arg:string) = let rec splitStr (argStr:string) = match argStr.Length with | 0 -> "" | 1 | 2 | 3 -> argStr | _ -> argStr.Substring(0, (argStr.Length-3)) |> splitStr |> (fun split -> split + "," + argStr.Substring(argStr.Length-3)) splitStr (arg) printfn "%s" (arg |> separate)