(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (alphabet (make-array 26 :initial-contents '("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"))) (word-array (make-array (* 26 26 26 26) :element-type 'string :initial-element ""))) (dotimes (a 26) (dotimes (b 26) (dotimes (c 26) (dotimes (d 26) (setf (aref word-array (+ (* 26 26 26 a) (* 26 26 b) (* 26 c) d)) (concatenate 'string "a" (aref alphabet a) (aref alphabet b) (aref alphabet c) (aref alphabet d) "a")))))) (dotimes (i (1- n)) (format t "~a~%" (aref word-array i))) (format t "~an~%" (aref word-array (1- n))))) (main)