NSUBSTR - Substrings
题号:NC237661
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

You are given a string S which consists of 250000 lowercase latin letters at most. We define F(x) as the maximal number of times that some string with length x appears in S. For example for string 'ababa', F(3) will be 2 because there is a string 'aba' that occurs twice. Your task is to output F(i) for every i so that .

输入描述:

String S consists of at most 250000 lowercase latin letters.

输出描述:

Output  lines. On the i-th line output F(i).
示例1

输入

复制
ababa

输出

复制
3
2
2
1
1