You are given a lowercase English string of length . A string is initially empty.
There are assignments in order. Immediately before the -th assignment, append the first characters of to the end of . Then find the number of occurrences of as a contiguous substring of the current .
Overlapping occurrences are all counted.
Find the answer for every assignment.
The input is given in the following format.
Print lines. The -th line must contain the answer to the -th assignment.