题目描述
Problem description:
There are students in a class fighting for a girl. As she came to know she decided that the boy will win who will help her find out specific characters present in a given string is present either "even" or "odd" number of times as asked by her. So help the boys win.
Input
Input description.
First input line consist of t number of test cases.
Next line consists of N, Q i.e. length of string and number of queries
Next input lines consists of string to be searched for
Next Q lines the queries as character to be searched, either "even" or "odd"
Output
Output description.
Each line consists of result "yes" or "no" for each query
Constraints
1 <= T <= 100
1<= N <= 100000
1<= Q <= 100
Example
Input:
1
5 2
aaabb
a even
b odd
Output:
no
no
输入格式
见题面
输出格式
见题面