(defpackage "ODAI-PT15-504" (:use "COMMON-LISP"))
(in-package "ODAI-PT15-504")
(loop with h = (make-hash-table :test #'equal)
for s = (read-line nil nil)
while s
do (incf (gethash s h 0))
finally (maphash (lambda (k v) (format t "~A ~A~%" k v)) h))
KGRlZnBhY2thZ2UgIk9EQUktUFQxNS01MDQiICg6dXNlICJDT01NT04tTElTUCIpKQooaW4tcGFja2FnZSAiT0RBSS1QVDE1LTUwNCIpCgoobG9vcCB3aXRoIGggPSAobWFrZS1oYXNoLXRhYmxlIDp0ZXN0ICMnZXF1YWwpCiAgICAgIGZvciBzID0gKHJlYWQtbGluZSBuaWwgbmlsKQogICAgICB3aGlsZSBzCiAgICAgIGRvIChpbmNmIChnZXRoYXNoIHMgaCAwKSkKICAgICAgZmluYWxseSAobWFwaGFzaCAobGFtYmRhIChrIHYpIChmb3JtYXQgdCAifkEgfkF+JSIgayB2KSkgaCkpCg==