You are given an array A of length N. A subsequence is called good if all the elements of that subsequence are distinct. Find the number of non-empty good subsequences modulo 109+7.
Two subsequences are different if they differ in the indices chosen.
Input Format:
Output Format:
For each test case, print the number of non-empty good subsequences modulo 109+7.
Constraints:
1≤T≤101≤N≤1051≤A[i]≤105
First test case:
Good subsequences are [2],[3],[1],[2,3],[2,1],[3,1],[2,3,1]. Hence, the answer is 7.
Second test case:
Good subsequences are [1],[1],[1],[1]. Hence, the answer is 4.