Buzzwords

Time limit1sMemory limit128 MB

Problem

The word THE is the most common three-letter word. It even appears inside other words, such as "other" and "mathematics", and it can hide split across two words, such as "not here". Have you ever wondered which words of lengths other than three are the most common?

You are given a text. Ignore every space, so that each line becomes one run of uppercase letters, and call any $k$ consecutive letters of that run a word of length $k$ (words may overlap). First, among all words of length $1$, take one that occurs most often; if it occurs more than once, output the number of occurrences. Then do the same for words of length $2$, $3$, and so on, stopping once you reach a length at which no word occurs more than once.

Input

The input is a sequence of lines. The last line is empty and must not be processed. Every line except the last contains at least $1$ and at most $1000$ characters, each of which is an uppercase letter or a space; the spaces are irrelevant and must be ignored.

Output

For each input line, print one number per line: the number of occurrences for words of length $1$, then length $2$, then $3$, and so on. When you reach a length at which no word repeats, print a single blank line, print nothing further for that input line, and move on to the next line.