Bob and James are about to play with an array A[] of N elements with Bob starting the game. In each turn :
The player whose turn makes array A[] becomes empty wins the game.
James is very intelligent and he modifies the game a bit. He selects some distinct elements (among those present in A) and removes all other elements which are not selected from A[]. The game is then played using this modified array.
For example, consider A=[1,1,3,12,2,34,2]. If James chooses values (1,2,34), then the array with which the game is played is [1,1,2,34,2].
Find the number of possible subsets of elements that James can select to modify A[] such that James is bound to win if both the players play optimally.
Consider an empty subset as a valid answer.
Since the number of possible subsets can be large enough, print the answer modulo 109+7.
Input format
Output format
For each test case, print the number of possible subsets satisfying the criteria modulo 109+7 in a new line.
Constraints
1≤T≤101≤N≤2×1051≤A[i]≤1018
Two possible solutions are :-