(defun main (&rest argv) (declare (ignorable argv)) (let* ((m (read))) (dotimes (_ m) (let* ((a (read)) (s "")) (loop while (/= a 0) do (let ((b a)) (setf a (floor (1- a) 2)) (if (= (1+ (* 2 a)) b) (setf s (concatenate 'string s "L")) (setf s (concatenate 'string s "R"))))) (format t "~a~%" (reverse s)))))) (main)