(defun format-string (s)
  (let ((len (length s)))
    (loop for i below len do
      (format t "~c" (char s i))
      (when (and (not (= i (1- len)))
                 (zerop (mod (- len i 1) 3)))
        (format t ",")))))

(defun main (&rest argv)
  (declare (ignorable argv))
  (let ((s (read-line)))
    (format-string s)
    (terpri)))

(main)