Micro is having a string S made of lowercase English alphabets. He wants to find out the index where the suffix having rank i starts, 1≤i≤|S|. Help Micro with this.
Input:
The only line of input consists of a string.
Output:
Print N space separated integers, where ith integer denotes the index where the suffix having rank i starts
Constraints:
1≤|S|≤10000
Suffixes of string are:
a - 4
ba - 3
aba - 2
aaba - 1
aaaba - 0
Sorted order
a - 4
aaaba - 0
aaba - 1
aba - 2
ba - 3
So , the output is 4 0 1 2 3