Code Submission Evaluation System Login

CSES Problem Set

Finding Borders


Task | Statistics


CSES - Finding BordersCSES - Finding Borders

Time limit:1.00 s Memory limit:512 MB

A border of a string is a prefix that is also a suffix of the string but not the whole string. For example, the borders of abcababcab are ab and abcab.

Your task is to find all border lengths of a given string.

Input

The only input line has a string of length $n$ consisting of characters a–z.

Output

Print all border lengths of the string in increasing order.

Constraints
Example

Input:
abcababcab

Output:
2 5