(defun kakikaki (lst &key (input "in.txt") (output "out.txt") &aux (lst (sort lst #'<))) (with-open-file (in input :direction :input) (with-open-file (out output :direction :output :if-exists :supersede) (loop for i from 1 by 1 for line = (read-line in nil :eof) until (eql line :eof) do (cond ((eql i (car lst)) (write-line line out) (setf lst (cdr lst))) (t (write-line "" out)))))))