from collections import Counter s=input() for i in range(len(s)): k=s.count(s[i]) print(k,s[i]) print(Counter(s))