This time the quarrel is between Joey and Monica, and the the quarrel is rather unique in itself. Both had decided to bring each other a date for Saturday night, but Joey, due to his carelessness forgot and therefore Monica was alone , again.
Now Monica is angry with Joey and decides to punish him. But after looking at Joey's cute face, she decides to give him a final chance. She gave him a set a numbers A[i] , and now she wants Joey to find out how many subsets of the following set have xor value less than or equal to her Lucky Number L.
But Joey is unfortunately dumb and therefore seeks your help. You should do this problem quickly, before Monica finds out that Joey is bailing on the problem.
Input:
T - No of test cases
N - No of elements in array
A line containing N space seperated integers A[i]
L - Her lucky number
Output:
The answer of the query as stated in the problem.
Constraints:
1≤T≤10
1≤N≤20
1≤A[i],L≤100
Problem Setter - Satyarth