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