Lee tried so hard to make a good div.2 D problem to balance his recent contest, but it still doesn't feel good at all. Lee invented it so tediously slow that he managed to develop a phobia about div.2 D problem setting instead. And now he is hiding behind the bushes...

Let's define a Rooted Dead Bush (RDB) of level $n$ as a rooted tree constructed as described below.

A rooted dead bush of level $1$ is a single vertex. To construct an RDB of level $i$ we, at first, construct an RDB of level $i-1$, then for each vertex $u$:   if $u$ has no children then we will add a single child to it;  if $u$ has one child then we will add two children to it;  if $u$ has more than one child, then we will skip it. 

 [Image] Rooted Dead Bushes of level $1$, $2$ and $3$. 

Let's define a claw as a rooted tree with four vertices: one root vertex (called also as center) with three children. It looks like a claw:

 [Image] The center of the claw is the vertex with label $1$. 

Lee has a Rooted Dead Bush of level $n$. Initially, all vertices of his RDB are green.

In one move, he can choose a claw in his RDB, if all vertices in the claw are green and all vertices of the claw are children of its center, then he colors the claw's vertices in yellow.

He'd like to know the maximum number of yellow vertices he can achieve. Since the answer might be very large, print it modulo $10^9+7$.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 10^4$) — the number of test cases.

Next $t$ lines contain test cases — one per line.

The first line of each test case contains one integer $n$ ($1 \le n \le 2 \cdot 10^6$) — the level of Lee's RDB.


-----Output-----

For each test case, print a single integer — the maximum number of yellow vertices Lee can make modulo $10^9 + 7$.


-----Example-----
Input
7
1
2
3
4
5
100
2000000

Output
0
0
4
4
12
990998587
804665184



-----Note-----

It's easy to see that the answer for RDB of level $1$ or $2$ is $0$.

The answer for RDB of level $3$ is $4$ since there is only one claw we can choose: $\{1, 2, 3, 4\}$.

The answer for RDB of level $4$ is $4$ since we can choose either single claw $\{1, 3, 2, 4\}$ or single claw $\{2, 7, 5, 6\}$. There are no other claws in the RDB of level $4$ (for example, we can't choose $\{2, 1, 7, 6\}$, since $1$ is not a child of center vertex $2$).

 $\therefore$ Rooted Dead Bush of level 4.

Difficulty: interview

Starter code:

Solutions:
# import numpy as np
# import sys

# q=int(input())
mod=1000000007
dp=[(0,0),(0,0)]
for i in range(2,2000001):
	dp.append(((max(dp[-1])+2*max(dp[-2]))%mod,(dp[-1][0]+2*dp[-2][0]+1)%mod))
for o in range(int(input())):
	print(max(dp[int(input())-1])*4%mod)
	
		
	


import sys
input = sys.stdin.readline

mod=10**9+7
ANS=[0,0,0,4,4]
HEAD=[0,0,0,1,0]
for i in range(2*10**6):
    if HEAD[-1]==0 and HEAD[-2]==0:
        ANS.append((ANS[-1]+ANS[-2]*2+4)%mod)
        HEAD.append(1)
    else:
        ANS.append((ANS[-1]+ANS[-2]*2)%mod)
        HEAD.append(0)
        

t=int(input())
for tests in range(t):
    n=int(input())
    print(ANS[n])

    


def gns():
    return list(map(int,input().split()))
t=int(input())
ns=[]
ans=[0,0,0,4,4,12]
for _ in range(t):
    n=int(input())
    ns.append(n)
mx=max(ns)
md=10**9+7
for i in range(6,mx+6):
    ans.append((ans[-2]*2+ans[-1]+(4 if i%3==0 else 0))%md)
for ni in ns:
    print(ans[ni])

from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
    return int(input())

def rl():
    return list(map(int, input().split()))

cache = [0] * (2 * 10**6 + 1)
cache[3] = 4
cache[4] = 4

def solve(last):
    n = ri()
    if cache[n] != 0:
        print(cache[n])
        return last

    mod = 10**9 + 7
    if n <= 2:
        print(0)
        return last
    elif n <= 4:
        print(4)
        return last
    else:
        j, k = last
        a, b = cache[j], cache[k]
        for i in range(k + 1, n + 1):
            a, b = b, (2 * a + b) % mod
            if i % 3 == 0:
                b = (b + 4) % mod
            cache[i] = b
        last = [n - 1, n]

        print (b)
        return last





mode = 'T'

if mode == 'T':
    t = ri()
    last = [3, 4]
    for i in range(t):
        last = solve(last)
else:
    solve()