(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (hashmap (make-hash-table)) (max-val 0) (res 0)) (dotimes (i n) (let* ((s (read-line)) (len-s (length s))) (setf (gethash len-s hashmap 0) (+ (gethash len-s hashmap 0) 1)))) (maphash (lambda (key val) (when (or (> val max-val) (and (= val max-val) (> key res))) (setf max-val val res key))) hashmap) (format t "~d~%" (- res 2)))) (main)