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>.
import sys

B = input()
podciagi = []


for p in range(0, len(B)):
    temp = B[p:]
    i = 0
    for j in range(0, len(temp)):
        temp2 = []
        bogactwo = 0
        for i in temp:
            if i not in temp2:
                bogactwo+=1
                temp2.append(i)
        podciagi.append([p, bogactwo, temp])

        temp = temp[:-1]

liczbaBogactw = {}
for i in range(1, len(B)):
    liczbaBogactw[i] = 0
 
for podciag in podciagi:
    liczbaBogactw[podciag[1]] += 1

print(liczbaBogactw)
print(podciagi[0][1])
for i in liczbaBogactw:
    print(liczbaBogactw[i])