String diversity is the number of symbols that occur in the string at least once. Diversity of *s* will be denoted by *d*(*s*). For example , *d*("aaa")=1, *d*("abacaba")=3.

Given a string *s*, consisting of lowercase Latin letters. Consider all its substrings. Obviously, any substring diversity is a number from 1 to *d*(*s*). Find statistics about substrings diversity: for each *k* from 1 to *d*(*s*), find how many substrings of *s* has a diversity of exactly *k*.
The input consists of a single line containing *s*. It contains only lowercase Latin letters, the length of *s* is from 1 to 3·10<sup class="upper-index">5</sup>.
def Diversity(st):
    repeat_list=[]
    count=0
    for s in st:
        if s not in repeat_list:
            repeat_list.append(s)
            count+=1
    return count

st=input()
count_dict=[]
y=Diversity(st)
print(y)
for i in range(1,y+1):
    count_dict.append(0)
for i in range(0,len(st)):
    for j in range(i+1,len(st)+1):
        count_dict[(Diversity(st[i:j]))-1]+=1
for i in count_dict:
    print(i)


