The block of a string at position is defined as the largest substring starting at position that matches a prefix of . The length of the block at position is considered to be zero.
Find the lengths of the blocks of string for all positions.
One string (|S| \le 10^6).
Print a single line containing the lengths of the blocks of string for all positions.
Example 1