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>.
poczotkoweznaki = input()
bogactwo = set(list(poczotkoweznaki)).__len__()
print(bogactwo)

bogactwa = [0] * (bogactwo+2)

for x in range(0,poczotkoweznaki.__len__()):
    aktualny_podciag = list()
    aktualne_bogactwo = 0
    znaki = poczotkoweznaki[x:]
    for znak in znaki:
        #print(znaki)
        if znak not in aktualny_podciag:
            aktualny_podciag.append(znak)
            aktualne_bogactwo +=1
            bogactwa[aktualne_bogactwo] +=1
        else:
            bogactwa[aktualne_bogactwo] +=1
            aktualny_podciag.append(znak)

for x in range(1, bogactwo+1):
    print(bogactwa[x])





