(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (alphabet "abcdefghijklmnopqrstuvwxyz")) (dotimes (a 26) (dotimes (b 26) (dotimes (c 26) (dotimes (d 26) (if (< (+ (* 26 26 26 a) (* 26 26 b) (* 26 c) d) (1- n)) (progn (write-char #\a) (write-char (aref alphabet a)) (write-char (aref alphabet b)) (write-char (aref alphabet c)) (write-char (aref alphabet d)) (write-char #\a) (terpri)) (return)))))) (format t "an~%"))) (main)