(defun main (&rest argv) (declare (ignorable argv)) (let* ((s (read-line)) (ans "Done!")) (loop for i from 0 below (length s) do (let ((c (char s i))) (cond ((char= c #\A) (incf i)) ((char= c #\,) nil) (t (setf ans "Failed...") (return))))) (format t "~a~%" ans))) (main)