import sys
import re
from collections import Counter
c = Counter(re.split(r'[\-.,\s;:?!]+', sys.stdin.read().strip()))
for w, i in sorted(c.items()):
if w:
print "{0}:{1}".format(w, i)
print "_________________________________\n"
for w, i in c.most_common():
if w:
print "{0}:{1}".format(w, i)
aW1wb3J0IHN5cwppbXBvcnQgcmUKZnJvbSBjb2xsZWN0aW9ucyBpbXBvcnQgQ291bnRlcgoKYyA9IENvdW50ZXIocmUuc3BsaXQocidbXC0uLFxzOzo/IV0rJywgc3lzLnN0ZGluLnJlYWQoKS5zdHJpcCgpKSkKCmZvciB3LCBpIGluIHNvcnRlZChjLml0ZW1zKCkpOgogIGlmIHc6CiAgICBwcmludCAiezB9OnsxfSIuZm9ybWF0KHcsIGkpCnByaW50ICJfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19cbiIKZm9yIHcsIGkgaW4gYy5tb3N0X2NvbW1vbigpOgogIGlmIHc6CiAgICBwcmludCAiezB9OnsxfSIuZm9ybWF0KHcsIGkpCg==