(defun main () (let ((n (read))) (loop repeat n for d = (read) do (princ (if (> d 1) (- (expt 10 d) (expt 10 (1- d))) 10)) (terpri)))) (main)