A - A

Time Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%I64d & %I64u

Submit

 

Status

Description


soda has a set   with   integers  . A set is called key set if the sum of integers in the set is an even number. He wants to know how many nonempty subsets of   are key set.

Input


There are multiple test cases. The first line of input contains an integer    , indicating the number of test cases. For each test case:  


The first line contains an integer    , the number of integers in the set.

Output


For each test case, output the number of key sets modulo 1000000007.

Sample Input


4
1
2
3
4

   

Sample Output

0
1
3
7


#include<cstdio>
#define M 1000000007
__int64 qpow(__int64 n)
{
__int64 cnt=2,ans=1;
while(n)
{
if(n&1)
{
ans=ans*cnt%M;
}
cnt=cnt*cnt%M;
n>>=1;
}
return ans;
}
int main()
{
__int64 t;
scanf("%I64d",&t);
while(t--)
{
__int64 n;
scanf("%I64d",&n);//找规律
printf("%I64d\n",qpow(n-1)-1);
}
return 0;
}