
(defun tr-s (n)
  (let ((tr-str "abcdefghij"))
    (subseq tr-str n (+ n 1))))

(defun add-char (str n)
  (loop as i
        below n
        collect (concatenate 'string str (tr-s i))))

(defun flat (x)
   (cond  ((null x) NIL)
          ((atom x) x)
          ((atom (car x)) (cons (car x) (flat (cdr x))))
          (T (append (flat (car x)) (flat (cdr x))))))



(defun get-str-seq (strs n c)
  (if (= n c)
      '("a")
      (flat (loop as str
                  in (get-str-seq strs n (+ c 1))
                  collect (add-char str (+ (- n c) 1))))))

(defun print-list (l)
  (loop as w
        in l
        do (format t "~A~%" w)))

(print-list (get-str-seq '() (read) 1))