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>.
s = input()
print(len(set(s)))
for i in range(len(set(s))):
  a = 0
  d = {chr(x) : 0 for x in range(ord('a'), ord('z') + 1)}
  c = 0
  k = 0
  l = 0
  for j in s:
    while c < i + 1 and k < len(s):
      d[s[k]] += 1
      if d[s[k]] == 1:
        c += 1
      k += 1
    while l < len(s) and d[s[l]] != 0:
      l += 1
    if c > i:
      a += l - k + 1
    d[j] -= 1
    if d[j] == 0:
      c -= 1
  print(a)