(defun main (&rest argv) (declare (ignorable argv)) (let* ((ha (read)) (wa (read)) (hb (read)) (wb (read)) (hc (read)) (wc (read)) (h1 (list 'A ha wa)) (h2 (list 'B hb wb)) (h3 (list 'C hc wc)) (h (list h1 h2 h3))) (dolist (item (mapcar #'car (sort h (lambda (x y) (if (= (second x) (second y)) (< (third x) (third y)) (> (second x) (second y))))))) (format t "~a~%" item)))) (main)