(doseq(x(set'l(sort(loop while(listen)collect(read-line))'> :key(defun k(s)(car(last(read-from-string(#1=format()"(~A)"s))))))))(#1#t"~D ~A "(1+(position(k x)l :key'k))x))