input = "wwwwaaadexxxxxx"
list = [0] * 26
for i in input:
    list[ord(i)-97]+=1
i=0
while i < len(input):
    print input[i], list[ord(input[i])-97]
    i += list[ord(input[i])-97]