First line contains an integer T denoting the number of test cases. Then follow T test cases. Each test case consists of two lines, each of which contains a string composed of English lower case and upper characters. First of these is the jewel string J and the second one is stone string S.

You can assume that 1 <= T <= 100, 1 <= |J|, |S| <= 100

### Output

Output for each test case, a single integer, the number of jewels mined.

### Example

**Input:** 4 abc abcdef aA abAZ aaa a what none **Output:** 3 2 1 0

#include<bits/stdc++.h>

using namespace std;

int main()

{

int t,i,k,count=0;

cin>>t;

```
while(t--)
{
string j,s;
cin>>j>>s;
for(i=0;i<j.size();i++)
{
for(k=0;k<s.size();k++)
{
if(j[i]==s[k])
count++;
}
}
cout<<count<<endl;
count=0;
}
return 0;
```

}