Matchbox
**InputFile**
The first line lists the lengths of the matches on the table from left to right. Each character in this line is a digit from '1' to '9', representing the length of each match. This line can contain between 1 and 100000 characters, inclusive.
The second line provides a space-separated list of pairs (X, Y), for which Tanya is interested in calculating a specific value. Each pair is formatted as "(X, Y)". This line can contain between 1 and 10000 pairs.
**OutputFile**
For each pair (X, Y) given in the second line, determine the maximum number of matches Tanya's brother can take from the table at one time. The numbers in the output should be in the same order as the pairs in the second line, separated by single spaces, as illustrated in the example output.
**Explanation of Examples**
*Sample 1*
In all 4 cases, Petya can take all the matches from the table at once.
*Sample 2*
In all 4 cases, Petya will always take one match from the table at a time.
*Sample 3*
*1st case: X=1, Y=5.* Petya will have matches {2, 3, 3, 3, 4} remaining. He will first take one match of length 2, then 3 matches of length 3, and finally one match of length 4. The maximum number of matches taken at once is 3.
*2nd case: X=0, Y=13.* Petya will have all the matches available. On the 5th step, he will take 4 matches of length 2.
*3rd case: X=2, Y=7.* Petya will have matches {3, 3, 3, 4, 2, 2} remaining. As expected, he will first take 3 matches of length 3, then one match of length 4, and finally the remaining 2 matches of length 2.