exec"s=''"+"+raw_input()"*8 for c in sorted(set(s)):print"%s:%%3s"%c%s.count(c)