Problem: Little Deepu and Little Kuldeep are the two best warriors in the realm of Westeros. But, their priorities and their loyalties are very much divided. Little Kuldeep fights for the right, just while Little Deepu fights for the wrong reasons, and supports the wrong ones in the kingdom.  Everyone's scared of these two warriors getting into a fight ever. But, in the final match of the tournament for the best warrior in the kingdom, these two warriors will eventually have to face each other. 

But, here's the twist. Since, everyone knows that these two are the best ones, no one wants them to die. So, it's a no-kill contest between them. They CANNOT kill each other. They just have to hit each other, with their best moves.

Both, Little Deepu and Little Kuldeep will get n chances to hit the opponent. But, since Little Deepu fights for the wrong people, he had the power to convince people that he'll be the attacker, and Kuldeep be the defender - that is to say. So, what will happen is the following: Little Kuldeep  CANNOT attack Little Deepu before Little Deepu attacks him. Little Kuldeep can only retaliate to Little Deepu's hits, and NOT hit him before Deepu hits him.

That is to say, let's say both of them have 3 moves. So, a valid hitting combination would be:
1. DDDKKK
2. DKDDKK
And 3 other combinations.

So, ONLY after Deepu hits Kuldeep can hit him back!

So, you being a volunteer in managing the fights, have to figure out the number of valid combinations of the n hits by the both of them.

Input format:
The first line contains the number of test cases.
Every test case contains an integer N.

Output format:
You've to print out the number of valid combinations modulo by 1000000007.

Constraints:
1 ≤ Test Cases < 1001
1 ≤ N ≤ 1000000  

SAMPLE INPUT
2
2
1548

SAMPLE OUTPUT
2
57584392

Solution (in PYTHON):

Solution:
import math

def pow_mod(a, d, cur):
	x = 1
	tmp = a
	while 1:
		if d%2 == 1:
			x = (x * tmp) % cur
		d = math.floor(d/2)
		if d > 0:
			tmp = (tmp * tmp) % cur
		else:
			break
	return x
	
#list = [1, 1]
numer = [1]
denom = [1]
t = int(raw_input())
found = 0
while t > 0:
	t = t - 1
	n = int(raw_input())
	if n <= found:
		multiplicant = pow_mod(denom[n], 1000000005, 1000000007)
		print (numer[n] * multiplicant) % 1000000007
		continue
	for i in range(found+1, n+1):
		temp = (((numer[i-1]*(2*i-1))%1000000007)*2)%1000000007
		numer.append(temp)
		temp = (denom[i-1]*(i+1))%1000000007
		denom.append(temp)
	found = n
	multiplicant = pow_mod(denom[n], 1000000005, 1000000007)
	print (numer[n] * multiplicant) % 1000000007