PROGRAMMING:Counting Lower-case Letters
Given a string consisting of lower-case letters chosen from `a-z`, you can obtain numbers of occurrence of each letter.
Now you are given a string and its several intervals together with a lower-case letter. Your task is to count the number of corresponding letter in each interval.
#### Input Specification:
Each input file contains one test case. In each test case, the first line contains a string consisting of no more than $$50,000$$ characters. And the second line contains an integer $$K$$ ($$<= 10^5$$, the number of queries). Then the following $$K$$ lines each give information in the format
`B E c`
where `B` and `E` denote the beginning and the end of interval, respectively, and `c` is a character (a-z). Hence the characters in the given string are indexed from 0 to $$N - 1$$, where $$N$$ is the length of the string.
#### Output Specification:
For each query, print in a line the count of corresponding letter.
#### Sample Input:
```in
aaabcadeefagg
three
0 3 a
2 5 b
4 7 d
```
#### Sample Output:
```out
three
one
one
```
answer:If there is no answer, please comment
Now you are given a string and its several intervals together with a lower-case letter. Your task is to count the number of corresponding letter in each interval.
#### Input Specification:
Each input file contains one test case. In each test case, the first line contains a string consisting of no more than $$50,000$$ characters. And the second line contains an integer $$K$$ ($$<= 10^5$$, the number of queries). Then the following $$K$$ lines each give information in the format
`B E c`
where `B` and `E` denote the beginning and the end of interval, respectively, and `c` is a character (a-z). Hence the characters in the given string are indexed from 0 to $$N - 1$$, where $$N$$ is the length of the string.
#### Output Specification:
For each query, print in a line the count of corresponding letter.
#### Sample Input:
```in
aaabcadeefagg
three
0 3 a
2 5 b
4 7 d
```
#### Sample Output:
```out
three
one
one
```
answer:If there is no answer, please comment