CQXYM is counting permutations length of $2n$.

A permutation is an array consisting of $n$ distinct integers from $1$ to $n$ in arbitrary order. For example, $[2,3,1,5,4]$ is a permutation, but $[1,2,2]$ is not a permutation ($2$ appears twice in the array) and $[1,3,4]$ is also not a permutation ($n=3$ but there is $4$ in the array).

A permutation $p$(length of $2n$) will be counted only if the number of $i$ satisfying $p_i<p_{i+1}$ is no less than $n$. For example:

Permutation $[1, 2, 3, 4]$ will count, because the number of such $i$ that $p_i<p_{i+1}$ equals $3$ ($i = 1$, $i = 2$, $i = 3$).

Permutation $[3, 2, 1, 4]$ won't count, because the number of such $i$ that $p_i<p_{i+1}$ equals $1$ ($i = 3$).

CQXYM wants you to help him to count the number of such permutations modulo $1000000007$ ($10^9+7$).

In addition, modulo operation is to get the remainder. For example:

$7 \mod 3=1$, because $7 = 3 \cdot 2 + 1$,

$15 \mod 4=3$, because $15 = 4 \cdot 3 + 3$.


-----Input-----

The input consists of multiple test cases.

The first line contains an integer $t (t \geq 1)$ — the number of test cases. The description of the test cases follows.

Only one line of each test case contains an integer $n(1 \leq n \leq 10^5)$.

It is guaranteed that the sum of $n$ over all test cases does not exceed $10^5$


-----Output-----

For each test case, print the answer in a single line.


-----Examples-----

Input
4
1
2
9
91234
Output
1
12
830455698
890287984


-----Note-----

$n=1$, there is only one permutation that satisfies the condition: $[1,2].$

In permutation $[1,2]$, $p_1<p_2$, and there is one $i=1$ satisfy the condition. Since $1 \geq n$, this permutation should be counted. In permutation $[2,1]$, $p_1>p_2$. Because $0<n$, this permutation should not be counted.

$n=2$, there are $12$ permutations: $[1,2,3,4],[1,2,4,3],[1,3,2,4],[1,3,4,2],[1,4,2,3],[2,1,3,4],[2,3,1,4],[2,3,4,1],[2,4,1,3],[3,1,2,4],[3,4,1,2],[4,1,2,3].$

Difficulty: EASY
Tags: Number theory

Combinatorics

Mathematics

Starter code:

Solutions:
t = int(input())
for i in range(t):
	n = int(input())
	s = 1
	k = 10 ** 9 + 7
	for i in range(3, 2 * n + 1):
		s = s * i % k
	print(s % k)


dp = [1] * 100001
for i in range(2, 100001):
	dp[i] = dp[i - 1] * (2 * i - 1) * (2 * i) % 1000000007
t = int(input())
for i in range(t):
	n = int(input())
	print(dp[n])


import sys
import os
from math import ceil, floor, sqrt, gcd, factorial, log, log2
from io import BytesIO, IOBase
from collections import Counter
from itertools import permutations, combinations
from bisect import bisect
from functools import reduce
inf = int(10000000000.0) + 7
BUFSIZE = 8192
inp = lambda : int(input())
mp = lambda : map(int, input().split())
lst = lambda : list(map(int, input().split()))

def factorialMod(n, modulus):
	ans = 1
	if n <= modulus // 2:
		for i in range(1, n + 1):
			ans = ans * i % modulus
	else:
		for i in range(1, modulus - n):
			ans = ans * i % modulus
		ans = modinv(ans, modulus)
		if n % 2 == 0:
			ans = -1 * ans + modulus
	return ans % modulus

def main():
	for _ in range(inp()):
		n = inp()
		n = 2 * n
		f = 3
		for i in range(4, n + 1):
			f = f * i % 1000000007
		if n == 2:
			print(1)
		elif n == 4:
			print(12)
		else:
			print(f % 1000000007)

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math

def solve(n):
	ans = 1 / 2
	for i in range(1, 2 * n + 1):
		ans = ans * i % 1000000007
	return int(ans)
num = int(input())
for n in range(num):
	n = input()
	print(solve(int(n)))


for _ in range(int(input())):
	n = 2 * int(input())
	f = 1
	for i in range(3, n + 1):
		f = f * i % (10 ** 9 + 7)
	print(f)


def solve(n):
	ans = 1
	for i in range(2 * n, 2, -1):
		ans = ans * i % 1000000007
	return ans
t = int(input())
for i in range(t):
	n = int(input())
	print(solve(n))


def solve():
	n = int(input())
	res = 1
	for j in range(3, 2 * n + 1):
		res *= j
		res %= 1000000007
	print(res)
t = int(input())
while t > 0:
	t -= 1
	solve()


for _ in range(int(input())):
	n = int(input())
	mod = 1000000007
	res = 1
	for i in range(3, 2 * n + 1):
		res = res * i % mod
	print(res)


from __future__ import division, print_function
import os
import sys
from fileinput import input
from io import BytesIO, IOBase
import math
mod = 1000000007
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():

	def solve():
		n = int(input())
		ans = 1
		for i in range(3, 2 * n + 1):
			ans = ans * i % mod
		return ans
	t = int(input())
	for i in range(t):
		print(solve())
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math

def modInverse(b, m):
	g = math.gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def modDivide(a, b, m):
	a = a % m
	inv = modInverse(b, m)
	if inv == -1:
		assert False, 'Division not defined'
	else:
		return inv * a % m

def fact(n):
	m = 10 ** 9 + 7
	f = 1
	for i in range(2, n + 1):
		f = f * i % m
	return modDivide(f, 2, m)
t = int(input().strip())
inputs = []
for _ in range(t):
	n = int(input().strip())
	inputs.append(n)
for n in inputs:
	print(fact(2 * n))


def modFact(n, p):
	if n >= p:
		return 0
	result = 1
	for i in range(3, n + 1):
		result = result * i % p
	return result
t = int(input())
for i in range(t):
	n = int(input())
	p = 1000000007
	print(modFact(2 * n, p))


def fact_by_2(n):
	modul = 10 ** 9 + 7
	prod = 1
	i = 3
	while i <= n:
		prod = prod * i
		if prod > modul:
			prod = prod % modul
		i = i + 1
	return prod

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		m = fact_by_2(2 * n)
		print(m)
main()


T = int(input())
for t in range(T):
	n = int(input())
	n = 2 * n
	fact = 1 / 2
	for i in range(2, n + 1):
		fact *= i
		fact = fact % (10 ** 9 + 7)
	print(int(fact))


t = int(input())
while t > 0:
	n = int(input())
	ans = 1
	mod = 1000000007
	for i in range(2 * n, 2, -1):
		ans = ans * i % mod
	ans = ans % mod
	print(ans)
	t = t - 1


for i in range(int(input())):
	n = 2 * int(input())
	fact = 1
	for i in range(3, n + 1):
		fact = fact * i % 1000000007
	print(fact)


s = int(input())
for i in range(s):
	n = int(input())
	res = 1
	for j in range(3, 2 * n + 1):
		res = res * j % (10 ** 9 + 7)
	print(res)


for _ in range(int(input())):
	n = int(input())
	fact = 1
	for j in range(3, 2 * n + 1):
		fact = fact * j % (10 ** 9 + 7)
	print(fact)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter, defaultdict
import math
import heapq
import bisect

def nck(n, k):
	res = 1
	for i in range(1, k + 1):
		res = res * (n - i + 1) // i
	return res
m = 10 ** 9 + 7
dp = [0] * (2 * 10 ** 5 + 1)
dp[0] = 1
dp[1] = 1
dp[2] = 1
for i in range(3, 2 * 10 ** 5 + 1):
	dp[i] = dp[i - 1] * i
	if dp[i] >= m:
		dp[i] %= m
for _ in range(int(input())):
	n = int(input())
	print(dp[2 * n])


i = 2
a = [1] * 3
while i < 4 ** 9:
	i += 1
	a += (a[-1] * i % (10 ** 9 + 7),)
for s in [*open(0)][1:]:
	print(a[int(s) * 2])


import sys
from sys import stdin, stdout
from math import ceil, floor, modf, sqrt, log, log2, log10
from collections import Counter
int_max = float('inf')
int_min = -float('inf')
mod = 10 ** 9 + 7
ANS = []
input = stdin.readline

def solve():
	pass
t = int(input())
for i in range(t):
	n = int(input())
	ans = 1
	if n == 1:
		print(ans)
		continue
	else:
		for i in range(3, 2 * n + 1):
			ans *= i
			ans %= mod
		print(ans)
print('\n'.join(ANS))


from collections import Counter, deque
import math
from random import randint
from bisect import bisect
import sys
import re
from time import time
MOD = 1000000007
MAX = sys.maxsize
MIN = -sys.maxsize
t = 0

class get:

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

	def str():
		return input().split()

	def float():
		return list(map(float, input().split()))

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

def sqrt(x):
	return int(math.sqrt(x)) + 1

def gcd(*args):
	result = args[0]
	for item in args:
		result = math.gcd(result, item)
	return result

def LCM(a, b):
	return a * b // math.gcd(a, b)

def solve():
	global t
	t0 = time()
	n = int(input())
	n = 2 * n
	if n == 2:
		print(1)
	else:
		res = 1
		for i in range(3, n + 1):
			res = res * i
			res = res % MOD
		print(res)
	t1 = time()
	t += t1 - t0
for _ in range(int(input())):
	solve()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	n *= 2
	ans = 0.5
	for i in range(1, n + 1):
		ans *= i
		ans %= 1000000007
	print(int(ans))


mod = 10 ** 9 + 7

def fact(n):
	f = 1
	for i in range(3, n + 1):
		f = f * i % mod
	return f
for _ in range(int(input())):
	a = int(input()) * 2
	print(fact(a))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
from bisect import bisect_left as lower_bound, bisect_right as upper_bound

def so():
	return int(input())

def st():
	return input()

def mj():
	return map(int, input().strip().split(' '))

def msj():
	return map(str, input().strip().split(' '))

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

def lebe():
	return list(map(int, input()))

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()

def joro(L):
	return ''.join(map(str, L))

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def npr(n, r):
	return factorial(n) // factorial(n - r) if n >= r else 0

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r)) if n >= r else 0

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def tir(a, b, c):
	if 0 == c:
		return 1
	if len(a) <= b:
		return 0
	if c != -1:
		return tir(a, 1 + b, c + a[b]) or tir(a, b + 1, c - a[b]) or tir(a, 1 + b, c)
	else:
		return tir(a, 1 + b, a[b]) or tir(a, b + 1, -a[b]) or tir(a, 1 + b, -1)

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = -1
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = mid
			break
	return ans

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	li = []
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, len(prime)):
		if prime[p]:
			li.append(p)
	return li

def primefactors(n):
	from math import sqrt
	factors = []
	while n % 2 == 0:
		factors.append(2)
		n //= 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			factors.append(i)
			n //= i
	if n > 2:
		factors.append(n)
	return factors

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def tr(n):
	return n * (n + 1) // 2

def ti(x):
	import math
	if x >= 0:
		s = math.sqrt(x)
	if s * s == x:
		return 1
	return 0
doi = int(1000000000.0 + 7)
boi = 998244353

def ryu(a, b):
	re = 1
	while b != 0:
		if b % 2 != 0:
			re *= a
			re %= boi
		b = b // 2
		a *= a
		a %= boi
	return re
fa = [0] * 100007

def pow(x, y, p):
	re = 1
	x = x % p
	while y > 0:
		if y % 2 != 0:
			re = re * x % p
		y = y // 2
		x = x * x % p
	return re

def mi(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, p):
	if n < r:
		return 0
	if r == 0:
		return 1
	return fa[n] * mi(fa[r], p) % p * mi(fa[n - r], p) % p % p

def iu():
	import re
	import sys
	input = sys.stdin.readline
	import math as my
	m = so()
	x = 1
	for i in range(2 * m, 2, -1):
		x *= i
		x = x % doi
	print(x % doi)

def main():
	for i in range(so()):
		iu()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
while t > 0:
	n = int(input())
	f = 1
	for i in range(3, 2 * n + 1):
		f = f * i % 1000000007
	print(f)
	t = t - 1


def f(n):
	s = 1
	for i in range(3, n + 1):
		s *= i
		s %= 10 ** 9 + 7
	return s
for _ in range(int(input())):
	n = int(input())
	print(f(n * 2))


t = int(input())
for _ in range(t):
	(n, ans, m) = (int(input()), 1, 1000000000.0 + 7)
	for i in range(2 * n, 2, -1):
		ans = ans * i % m
	print(int(ans % m))


from collections import deque
import heapq
from math import sqrt
import operator
from operator import itemgetter
import sys
import copy
inf_var = 0
if inf_var == 1:
	inf = open('input.txt', 'r')
else:
	inf = sys.stdin
input = inf.readline

def read_one_int():
	return int(input().rstrip('\n'))

def read_one_float():
	return float(input().rstrip('\n'))

def read_list_of_ints():
	res = [int(val) for val in input().rstrip('\n').split()]
	return res

def read_list_of_ints_zero():
	return [int(val) - 1 for val in input().rstrip('\n').split()]

def read_str():
	return input().rstrip()

def bfs(q, graph, dist):
	while len(q):
		cur_v = q.popleft()
		for to in graph[cur_v]:
			if dist[to] == -1:
				dist[to] = dist[cur_v] + 1
				q.append(to)

def sort_vert(n, graph):
	dist = [-1] * n
	q = deque()
	dist[0] = 0
	q.append(0)
	bfs(q, graph, dist)
	vertices = []
	for (vert, dist) in enumerste(dist):
		verticies.append((dist, vert))
	verticies.sort()
	res = [vert for (dist, vert) in verticies]
	return res

def main():
	tests = read_one_int()
	mod = 10 ** 9 + 7

	def mult(a, b, mod):
		return a % mod * (b % mod) % mod
	for _ in range(tests):
		n = read_one_int()
		n *= 2
		res = 1
		for i in range(3, n + 1):
			res = mult(res, i, mod)
		print(res)
main()


cn = 10 ** 9 + 7
c = 2 * cn
f = [1]
for i in range(1, 10 ** 5 * 2 + 5):
	f.append(f[-1] * i % c)
for i in range(int(input())):
	n = int(input())
	print(f[2 * n] // 2)


for i in range(int(input())):
	MOD = 1000000007
	ans = 1
	n = int(input())
	n *= 2
	while n > 2:
		ans *= n
		ans %= MOD
		n -= 1
	print(ans)


rr = lambda : input().strip()
rrm = lambda : map(int, rr().split())
M = 10 ** 9 + 7

def fac(x):
	prod = 1
	for i in range(3, x + 1):
		prod = prod * i % M
	return prod

def solve():
	n = int(rr())
	ans = fac(2 * n)
	ans = ans
	return ans % M
T = int(rr())
for _ in range(T):
	ans = solve()
	print(ans)


mod = 1000000007

def solve(n):
	mul_ = 1
	for i in range(3, 2 * n + 1):
		mul_ = mul_ * i % mod
	return mul_
for _ in range(int(input())):
	n = int(input())
	print(solve(n))


t = int(input())
while t > 0:
	n = int(input())
	res = 1
	for i in range(2 * n, 2, -1):
		res = res * i % 1000000007
	res %= 1000000007
	print(res)
	t -= 1


def factorial(n):
	for i in range(3, n):
		n = n * i
		n %= 1000000007
	return n
for i in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	else:
		print(factorial(2 * n))


def main():
	n = int(input())
	ans = 1
	for i in range(3, 2 * n + 1):
		ans *= i
		ans %= 1000000007
	print(ans)
t = int(input())
for _ in range(t):
	main()


t = int(input())
for tc in range(t):
	n = int(input())
	res = 1
	mod = 1000000007
	i = 2 * n
	while i >= 3:
		res = res * i % mod
		i -= 1
	print(res % mod)


(t, f) = (int(input()), [0] * 200001)
f[2] = 1
for x in range(3, 200001):
	f[x] = f[x - 1] * x % 1000000007
for x in range(t):
	print(f[int(input()) << 1])


def factorial(n):
	mod = 1000000007
	fact_fun = 1
	for i in range(3, 2 * n + 1):
		fact_fun = fact_fun * i % mod
	return fact_fun
for i in range(int(input())):
	a = int(input())
	print(factorial(a))


for _ in range(int(input())):
	a = int(input())
	b = 1
	for i in range(3, a * 2 + 1):
		b *= i
		b = b % (10 ** 9 + 7)
	print(b)


MOD = 1000000007
fact = [[] for i in range(200005)]
fact[0] = 1
for i in range(1, 200000):
	fact[i] = fact[i - 1] * i % MOD
for _ in range(int(input())):
	n = int(input())
	print(n * fact[2 * n - 1] % MOD)


t = int(input())
MOD = 1000000007
for _ in range(t):
	n = int(input())
	fact = 1
	for i in range(3, 2 * n + 1):
		fact = fact * i % MOD
	print(fact % MOD)


def fact(n):
	m = 1000000007
	global ff
	ff = 1
	for i in range(3, 2 * n + 1):
		ff = ff * i % m
	return ff
for i in range(int(input())):
	a = int(input())
	print(fact(a))


import math
for _ in range(int(input())):
	n = int(input())
	totalPerms = 0.5
	for i in range(1, 2 * n + 1):
		totalPerms = totalPerms * i % 1000000007
	print(int(totalPerms))


import sys
MOD = 1000000007

def main(n):
	ans = 1
	for i in range(3, 2 * n + 1):
		ans = ans * i % MOD
	return ans
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	n = int(input())
	print(main(n))


def main():
	mod = 1000000007
	fibs = [1 for _ in range(3)]

	def calculate(x):
		for i in range(3, x):
			y = fibs[-1] * i
			if y >= mod:
				y %= mod
			fibs.append(y)

	def solve(n):
		return fibs[n]
	t = int(input())
	vals = []
	mx = -1
	for _ in range(t):
		n = int(input())
		if n > mx:
			mx = n
		vals.append(n)
	calculate(2 * mx + 2)
	for v in vals:
		print(solve(2 * v))
import sys, threading
input = sys.stdin.readline
thread = threading.Thread(target=main)
thread.start()
thread.join()


for _ in range(int(input())):
	n = int(input())
	p = 1
	for i in range(3, n * 2 + 1):
		p = p * i % 1000000007
	print(p)


mod = 1000000000.0 + 7
for _ in range(int(input())):
	n = int(input())
	f = 1
	for i in range(3, 2 * n + 1):
		f = int(f * i % mod)
	print(f)


for _ in range(int(input())):
	a = int(input())
	f = 1
	k = 10 ** 9 + 7
	for i in range(3, 2 * a + 1):
		f = f * i % k
	print(f % k)


inp1 = int(input())
for i in range(inp1):
	n = int(input())
	a = 1000000007
	b = 1
	for j in range(3, 2 * n + 1):
		b = b * j % a
	print(b)


from sys import stdin
input = stdin.readline
mod = 10 ** 9 + 7

def add(a, b):
	return (a % mod + b % mod) % mod

def mul(a, b):
	return a % mod * (b % mod) % mod

def div(a, b):
	return mul(a % mod, pow(b, mod - 2, mod))

def answer():
	f = 1
	for i in range(1, 2 * n + 1):
		f = mul(f, i)
	return div(f, 2)
for T in range(int(input())):
	n = int(input())
	print(answer())


import bisect
import heapq
import math
import collections
import sys
import copy
from functools import reduce
import decimal
from io import BytesIO, IOBase
import os
import itertools
import functools
from types import GeneratorType
sys.setrecursionlimit(10 ** 9)
decimal.getcontext().rounding = decimal.ROUND_HALF_UP
graphDict = collections.defaultdict
queue = collections.deque

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		to = f(*args, **kwargs)
		if stack:
			return to
		else:
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						return to
					to = stack[-1].send(to)
	return wrappedfunc

class Graphs:

	def __init__(self):
		self.graph = graphDict(set)

	def add_edge(self, u, v):
		self.graph[u].add(v)

	def dfs_utility(self, nodes, visited_nodes):
		visited_nodes.add(nodes)
		for neighbour in self.graph[nodes]:
			if neighbour not in visited_nodes:
				self.dfs_utility(neighbour, visited_nodes)

	def dfs(self, node):
		Visited = set()
		self.dfs_utility(i, Visited)

	def bfs(self, node, f_node):
		count = float('inf')
		visited = set()
		level = 0
		if node not in visited:
			queue.append([node, level])
			visited.add(node)
		flag = 0
		while queue:
			parent = queue.popleft()
			if parent[0] == f_node:
				flag = 1
				count = min(count, parent[1])
			level = parent[1] + 1
			for item in self.graph[parent[0]]:
				if item not in visited:
					queue.append([item, level])
					visited.add(item)
		return count if flag else -1
		return False

	def solve(self, in_degree):
		c = 0
		tracker = queue()
		ans = graphDict(lambda : 1)
		for ii in range(n):
			if in_degree[ii + 1] == 0:
				tracker.append(ii + 1)
		while tracker:
			node = tracker.popleft()
			c += 1
			for neighbour in self.graph[node]:
				in_degree[neighbour] -= 1
				if neighbour < node:
					ans[neighbour] = max(ans[neighbour], ans[node] + 1)
				else:
					ans[neighbour] = max(ans[neighbour], ans[node])
				if in_degree[neighbour] == 0:
					tracker.append(neighbour)
		if c != n:
			return False
		else:
			return max(ans.values()) if len(ans.values()) > 0 else 1
		return 'Send Help!!!!'

class Tree:

	def __init__(self, data):
		self.data = data
		self.left = None
		self.right = None

def inorder(node, lis):
	if node:
		inorder(node.left, lis)
		lis.append(node.data)
		inorder(node.right, lis)
	return lis

def leaf_node_sum(root):
	if root is None:
		return 0
	if root.left is None and root.right is None:
		return root.data
	return leaf_node_sum(root.left) + leaf_node_sum(root.right)

def hight(root):
	if root is None:
		return -1
	if root.left is None and root.right is None:
		return 0
	return max(hight(root.left), hight(root.right)) + 1

class UF:

	def __init__(self, N):
		self._id = list(range(N))
		self._count = N
		self._rank = [0] * N

	def find(self, p):
		id = self._id
		while p != id[p]:
			p = id[p]
		return p

	def count(self):
		return self._count

	def connected(self, p, q):
		return self.find(p) == self.find(q)

	def union(self, p, q):
		id = self._id
		rank = self._rank
		i = self.find(p)
		j = self.find(q)
		if i == j:
			return
		self._count -= 1
		if rank[i] < rank[j]:
			id[i] = j
		elif rank[i] > rank[j]:
			id[j] = i
		else:
			id[j] = i
			rank[i] += 1

	def add_roads(self):
		return set(self._id)

	def __str__(self):
		return ' '.join([str(x) for x in self._id])

	def __repr__(self):
		return 'UF(' + str(self) + ')'

def rounding(n):
	return int(decimal.Decimal(f'{n}').to_integral_value())

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0), []))

def p_sum(array):
	return list(itertools.accumulate(array))

def diophantine(a: int, b: int, c: int):
	(d, x, y) = extended_gcd(a, b)
	r = c // d
	return (r * x, r * y)

@bootstrap
def extended_gcd(a: int, b: int):
	if b == 0:
		(d, x, y) = (a, 1, 0)
	else:
		(d, p, q) = (yield extended_gcd(b, a % b))
		x = q
		y = p - q * (a // b)
	yield (d, x, y)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, **kwargs):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def inp():
	return sys.stdin.readline().strip()

def map_inp(v_type):
	return map(v_type, inp().split())

def list_inp(v_type):
	return list(map_inp(v_type))

def update(fen_tree, index):
	while index < len(fen_tree):
		fen_tree[index] += 1
		index += index & -index

def query(fen_tree, index):
	s = 0
	while index > 0:
		s += fen_tree[index]
		index -= index & -index
	return s
mod = 10 ** 9 + 7
temp = 1
dic = {}
dic[2] = 1
for i in range(3, 200001):
	temp *= i % mod
	temp %= mod
	if i & 1 == 0:
		dic[i] = temp
for _ in range(int(inp())):
	n = int(inp())
	print(dic[2 * n])


md = 1000000007 * 2
for _ in range(int(input())):
	a = 1
	for i in range(2 * int(input())):
		a = a * (i + 1) % md
	print(a // 2)


t = int(input())
for i in range(t):
	n = int(input())
	fact = 1
	for j in range(3, 2 * n + 1):
		fact = fact * j % (10 ** 9 + 7)
	print(fact)


loop = int(input())
md = 1000000007
for i in range(loop):
	n = int(input())
	res = 1
	for i in range(2 * n, 2, -1):
		res = res * i % md
	res = res % md
	print(res)


import sys, os
from io import BytesIO, IOBase
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(stdin, stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def ceil(a, b):
	return (a + b - 1) // b
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
N = 2 * 10 ** 5 + 5
fact = l1d(N)
fact[0] = 1
for i in range(1, N):
	fact[i] = fact[i - 1] * i
	fact[i] %= mod
for _ in range(iinp()):
	n = iinp()
	print(fact[2 * n] * pow(2, mod - 2, mod) % mod)


t = int(input())
for p in range(t):
	n = int(input())
	MOD = 1000000007
	ans = 1
	for i in range(3, 2 * n + 1, 1):
		ans = ans * i % MOD
	print(ans)


def read_nums():
	return [int(x) for x in input().split()]

def solve():
	(n,) = read_nums()
	res = 1
	for i in range(3, 2 * n + 1):
		res = res * i % 1000000007
	print(res)

def main():
	(t,) = read_nums()
	for _ in range(t):
		solve()
main()


def f(a):
	s = 1
	for i in range(3, a + 1):
		s *= i
		s %= 1000000007
	return s
for i in range(int(input())):
	x = int(input())
	print(f(x * 2))


for _ in range(int(input())):

	def fact(x, p=1000000007):
		result = 1
		for i in range(2, x):
			result = result * i % p
		result = result * (x // 2) % p
		return result
	n = int(input())
	print(fact(2 * n))


(test, mod) = (int(input()), 1000000007)
for _ in range(test):
	n = int(input())
	val = 1
	for i in range(3, 2 * n + 1):
		val = val * i % mod
	print(val)


def sfac(n):
	if n == 2:
		return 1
	elif n == 4:
		return 12
	elif n == 6:
		return 30 * 12
	ans = 1
	for i in range(3, n + 1):
		ans *= i
		ans = ans % 1000000007
	return ans
for fghj in range(int(input())):
	n = int(input())
	print(sfac(2 * n))


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
MOD = 10 ** 9 + 7
two = pow(2, MOD - 2, MOD)
fact = [1 for i in range(2 * 10 ** 5 + 5)]
for i in range(1, 2 * 10 ** 5 + 1):
	fact[i] = fact[i - 1] * i
	fact[i] %= MOD
for _ in range(inp()):
	ans = fact[2 * inp()] * two
	ans %= MOD
	print(ans)


def fact(n):
	f = 1
	for i in range(3, n + 1):
		f = f * i % 1000000007
	return f
t = int(input())
for o in range(t):
	n = input()
	n = int(n)
	n *= 2
	print(fact(n))


def fc(k):
	m = 1000000007
	f = 1
	for i in range(3, 2 * k + 1):
		f = f * i % m
	print(f)
tes = int(input())
while tes > 0:
	k = int(input())
	fc(k)
	tes -= 1


def fact(n):
	mod = 1000000007
	funfact = 1
	for i in range(3, 2 * n + 1):
		funfact = funfact * i % mod
	return funfact
for i in range(int(input())):
	a = int(input())
	print(fact(a))


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	res = 1
	for i in range(1, 2 * n + 1):
		res *= i
		if i != 2 * n:
			res %= 10 ** 9 + 7
	print(res // 2 % (10 ** 9 + 7))


import math
for _ in range(int(input())):
	n = int(input())
	f = 1
	m = 10 ** 9 + 7
	for i in range(3, 2 * n + 1):
		f = f * i % m
	print(f)


def modFact(n, m):
	result = 1
	for i in range(3, n + 1):
		result = result * i % m
	return result
m = 1000000007
for t in range(int(input())):
	n = int(input())
	d = modFact(2 * n, m)
	print(d)


import math
import sys
import operator as op
from functools import reduce
from collections import OrderedDict

class Input:

	@staticmethod
	def string():
		return str(input())

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(sep=' '):
		return input().split(sep)

	@staticmethod
	def list_int(sep=' '):
		return list(map(int, input().split(sep)))

class Output:

	@staticmethod
	def print(res):
		print(res)

	@staticmethod
	def string(res):
		print(str(res))

	@staticmethod
	def list(res):
		print(' '.join((str(x) for x in res)))

class Algorithms:

	@staticmethod
	def isPrime(n):
		return all((n % i != 0 for i in range(2, int(math.sqrt(n) + 1))))

	@staticmethod
	def getPrimeNumbers(n):
		a = [1]
		for num in range(2, n):
			if all((num % i != 0 for i in range(2, int(math.sqrt(num) + 1)))):
				a.append(num)
		return a

	@staticmethod
	def factorization(n):
		res = {}
		for i in range(2, n * n):
			cnt = 0
			while n % i == 0:
				cnt += 1
				n = n / i
			if cnt > 0:
				res[i] = cnt
		if n > 1:
			res[n] = 1
		return res

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		else:
			a = a % b
			return Algorithms.gcd(b, a)

	@staticmethod
	def lcm(a, b):
		return abs(a * b) // Algorithms.gcd(a, b)

	@staticmethod
	def fibonacci(n):
		a = [0, 1]
		for i in range(2, n + 1):
			a.append(a[i - 1] - a[i - 2])
		return a[n]

	@staticmethod
	def z_func(s):
		n = len(s)
		z = [0] * n
		l = r = 0
		for i in range(1, n):
			if r >= i:
				z[i] = min(z[i - l], r - i + 1)
			while z[i] + i < n and s[z[i]] == s[z[i] + i]:
				z[i] += 1
			if i + z[i] - 1 > r:
				l = i
				r = i + z[i] - 1
		return z

	@staticmethod
	def faktorial(n):
		factorial = 1
		for i in range(3, n + 1):
			factorial *= i
			factorial = factorial % (math.pow(10, 9) + 7)
		return factorial

def solve():
	n = Input.int()
	p = 2 * n
	print(int(Algorithms.faktorial(p)))
query_count = Input.int()
while query_count:
	query_count -= 1
	solve()


res = ''
for _ in range(int(input())):
	n = int(input())
	ans = 1
	for i in range(3, 2 * n + 1):
		ans *= i
		ans %= 1000000007
	res += str(ans) + '\n'
print(res)


a = int(input())
for i in range(a):
	b = int(input())
	c = 1000000007
	d = 1
	for j in range(3, 2 * b + 1):
		d = d * j % c
	print(d)


MOD = 10 ** 9 + 7

def fact(a):
	ans = 1
	for i in range(1, a + 1):
		ans *= i
		ans %= MOD
	return ans
inv2 = pow(2, MOD - 2, MOD)
for _ in range(int(input())):
	n = int(input())
	a = fact(2 * n)
	print(a * inv2 % MOD % MOD)


t = int(input())
for i in range(t):
	n = int(input())
	p = 1
	m = 1000000007
	for j in range(2, 2 * n):
		p = p % m * ((j + 1) % m) % m
	p = p % m
	print(p)


t = int(input())
while t:
	num = int(input())
	res = 1
	mod = 1000000000.0 + 7
	for i in range(2 * num, 2, -1):
		res = res * i % mod
	res = res % mod
	print(round(res))
	t = t - 1


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 1
	for k in range(3, 2 * n + 1):
		ans *= k
		ans %= 10 ** 9 + 7
	print(ans)


def f(n):
	pmod = 7 + 10 ** 9
	ss = 1
	for i in range(3, n + 1):
		ss = ss * i % pmod
	return ss
t = int(input())
l = []
for k in range(t):
	n = int(input())
	l.append(f(2 * n))
for j in l:
	print(j)


fac = [1, 1, 1]
mod = 10 ** 9 + 7
for i in range(3, 212345):
	fac.append(i * fac[-1] % mod)
for _ in range(int(input())):
	n = int(input())
	print(fac[2 * n])


fact = [1 for i in range(200002)]
for i in range(1, len(fact)):
	fact[i] = fact[i - 1] % 1000000007 * (i % 1000000007)
T = int(input())
for t in range(T):
	n = int(input())
	print(fact[2 * n] // 2 % 1000000007)


t = int(input())
for i in range(t):
	a = int(input())
	s = 1
	for j in range(3, 2 * a + 1):
		s = s * j % 1000000007
	print(s)


mod = 10 ** 9 + 7
ans = [1]
t = 1
for i in range(1, 2 * 10 ** 5 + 1):
	ans.append(t * i // 2 % mod)
	t = t * i % mod
for _ in range(int(input())):
	n = int(input())
	print(ans[2 * n])


t = int(input())
yo = 10 ** 9 + 7
for i in range(t):
	n = int(input())
	arr = [0, 0, 1]
	for j in range(3, 2 * n + 1):
		arr.append(arr[j - 1] % yo * (j % yo) % yo)
	print(arr[-1])


def countPermutations(n):
	res = 1
	mod = 1000000007
	for i in range(3, n + 1):
		res = res * i % mod
	return res
nTests = int(input())
for _ in range(nTests):
	n = int(input())
	print(countPermutations(2 * n))


import sys
input = sys.stdin.readline

class Node:

	def __init__(self, value) -> None:
		self.value = value
		self.next = None

	@staticmethod
	def print_list(head):
		curr = head
		while curr != None:
			print(curr.value, end=' ')
			curr = curr.next
		print('')
import math

def modInverse(b, m):
	g = math.gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def modDivide(a, b, m):
	a = a % m
	inv = modInverse(b, m)
	return inv * a % m
mod = 10 ** 9 + 7

def fact(n):
	x = 1
	for k in range(1, 2 * n + 1):
		x = x * k % mod
	return x

def main():
	n = int(input())
	print(modDivide(fact(n), 2, mod))
for _t in range(int(input())):
	main()


fact_arr = [1, 1, 1]
for i in range(3, 200001):
	fact_arr.append(fact_arr[i - 1] * i % int(1000000000.0 + 7))
for _ in range(int(input())):
	n = 2 * int(input())
	print(int(int(fact_arr[n]) % (1000000000.0 + 7)))


def half(x):
	p = 1
	for i in range(3, x + 1):
		p *= i
		p %= 1000000007
	return p
for _ in range(int(input())):
	n = int(input())
	print(half(2 * n))


testcase = int(input())
while testcase:
	n = int(input())
	fac = int(1)
	for i in range(1, int(2 * n + 1)):
		if i != 2:
			fac = fac * i % (10 ** 9 + 7)
	print(fac)
	testcase -= 1


for _ in range(int(input())):
	n = int(input())
	M = 1000000007
	f = 1
	for i in range(3, 2 * n + 1):
		f = f * i % M
	print(f % M)


import sys, os, io
input = sys.stdin.readline
PI = 3.141592653589793
INF = float('inf')
MOD = 1000000007

def bin32(num):
	return '{0:032b}'.format(num)

def add(x, y):
	return (x + y) % MOD

def sub(x, y):
	return (x - y + MOD) % MOD

def mul(x, y):
	return x * y % MOD

def gcd(x, y):
	if y == 0:
		return x
	return gcd(y, x % y)

def lcm(x, y):
	return x * y // gcd(x, y)

def power(x, y):
	res = 1
	x %= MOD
	while y != 0:
		if y & 1:
			res = mul(res, x)
		y >>= 1
		x = mul(x, x)
	return res

def mod_inv(n):
	return power(n, MOD - 2)

def prob(p, q):
	return mul(p, power(q, MOD - 2))

def ii():
	return int(input())

def li():
	return [int(i) for i in input().split()]

def ls():
	return [i for i in input().split()]
fact = [1]
for i in range(1, 2 * 10 ** 5 + 5):
	fact.append(mul(fact[-1], i))
for t in range(ii()):
	n = ii()
	print(fact[2 * n] * mod_inv(2) % MOD)


b = int(input())
c = []
for i in range(b):
	c.append(int(input()))
for j in range(b):
	s = 1
	for k in range(1, 2 * c[j] + 1):
		s = s * k % 1000000007
	print(s * 500000004 % 1000000007)


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
tot = [0, 1]
M = 10 ** 9 + 7
for i in range(1, 100004):
	index = (i * 2 + 1) * (i * 2 + 2)
	tot.append(tot[-1] * index % M)

def main(t):
	n = int(input())
	print(tot[n])
T = int(input())
t = 1
while t <= T:
	main(t)
	t += 1


from math import factorial as f
MOD = 10 ** 9 + 7
t = int(input())
for _ in range(0, t):
	n = int(input())
	v = 1
	for i in range(3, n * 2 + 1):
		v = v * i % MOD
	print(v)


for _ in range(int(input())):
	n = int(input())
	c = 1
	limit = 10 ** 9 + 7
	for i in range(3, 2 * n + 1):
		c = c * i % limit
	print(c % limit)


import sys
input = sys.stdin.readline
_ = 1
_ = int(input())
while _ > 0:
	_ -= 1
	n = int(input())
	ans = 1
	for x in range(3, 2 * n + 1):
		ans *= x
		ans %= 10 ** 9 + 7
	print(ans)


MOD = 10 ** 9 + 7

class ModInt:

	def __init__(self, x):
		self.x = x % MOD

	def __str__(self):
		return str(self.x)
	__repr__ = __str__

	def __add__(self, other):
		return ModInt(self.x + other.x) if isinstance(other, ModInt) else ModInt(self.x + other)

	def __sub__(self, other):
		return ModInt(self.x - other.x) if isinstance(other, ModInt) else ModInt(self.x - other)

	def __mul__(self, other):
		return ModInt(self.x * other.x) if isinstance(other, ModInt) else ModInt(self.x * other)

	def __truediv__(self, other):
		return ModInt(self.x * pow(other.x, MOD - 2, MOD)) if isinstance(other, ModInt) else ModInt(self.x * pow(other, MOD - 2, MOD))

	def __pow__(self, other):
		return ModInt(pow(self.x, other.x, MOD)) if isinstance(other, ModInt) else ModInt(pow(self.x, other, MOD))
	__radd__ = __add__

	def __rsub__(self, other):
		return ModInt(other.x - self.x) if isinstance(other, ModInt) else ModInt(other - self.x)
	__rmul__ = __mul__

	def __rtruediv__(self, other):
		return ModInt(other.x * pow(self.x, MOD - 2, MOD)) if isinstance(other, ModInt) else ModInt(other * pow(self.x, MOD - 2, MOD))

	def __rpow__(self, other):
		return ModInt(pow(other.x, self.x, MOD)) if isinstance(other, ModInt) else ModInt(pow(other, self.x, MOD))
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 5)
INF = 10 ** 18

def solve():
	N = int(input())
	ans = ModInt(1)
	for i in range(2, 2 * N + 1):
		ans *= i
	print(ans / 2)
Q = int(input())
for _ in range(Q):
	solve()


p = 1000000007

def fact_mod_p(n):
	acc = 1
	for i in range(3, n + 1):
		acc = acc * i % p
	return acc

def manipulation(n):
	print(fact_mod_p(2 * n))
for i in range(int(input())):
	manipulation(int(input()))


R = lambda : map(int, input().split())
limit = 200000
mod = 10 ** 9 + 7
l = [None] * (limit + 1)
i = 3
l[2] = 1
while i <= limit:
	l[i] = l[i - 1] * i % (10 ** 9 + 7)
	i += 1
for s in [*open(0)][1:]:
	print(l[int(s) * 2])


import sys
input = sys.stdin.readline
print = sys.stdout.write
for _ in range(int(input())):
	a = int(input())
	ans = 1
	for i in range(3, a * 2 + 1):
		ans = ans * i % 1000000007
	print(str(ans) + '\n')


ans = [1, 1]
pri = pow(10, 9) + 7
for i in range(1, 2 * pow(10, 5) + 5):
	ans.append(ans[-1] * (i + 1))
	ans[-1] %= pri
a = int(input())
for i in range(a):
	s = int(input())
	t = ans[2 * s - 1]
	print(t * s % pri)


n = int(input())
mod = 1000000007
for j in range(n):
	x = int(input())
	ans = 1
	for i in range(2 * x, 2, -1):
		ans = ans * i % mod
	ans = ans % mod
	print(ans)


import sys
input = sys.stdin.readline

def I():
	return input().strip()

def II():
	return int(input().strip())

def LI():
	return [*map(int, input().strip().split())]
import copy, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter, OrderedDict
from itertools import permutations, combinations, groupby
from operator import itemgetter
import decimal
from collections import *
for _ in range(II()):

	def factoriall(ll, pp):
		m = 1
		if ll > 2:
			for i in range(3, ll + 1):
				m = m * i % pp
		return m
	n = II()
	l = 10 ** 9 + 7
	xx = 2 * n
	z = factoriall(xx, l)
	print(z)


def main():
	mod = 1000000007

	def solve(n):
		ret = 1
		for f in range(3, n):
			ret *= f
			ret %= mod
		return ret
	t = int(input())
	for _ in range(t):
		n = int(input())
		print(solve(2 * n + 1))
import sys, threading
input = sys.stdin.readline
thread = threading.Thread(target=main)
thread.start()
thread.join()


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	(c, m) = (1, pow(10, 9) + 7)
	for i in range(2 * n, 2, -1):
		c = c * i % m
	c = c % m
	print(c)


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def get_int():
	return int(sys.stdin.readline().strip())

def get_list_strings():
	return list(map(str, sys.stdin.readline().strip().split()))

def solve(n):
	ans = 1
	M = 10 ** 9 + 7
	for i in range(3, n + 1):
		ans *= i
		ans = ans % M
	print(ans)
T = get_int()
while T:
	n = get_int()
	n *= 2
	solve(n)
	T -= 1


for x in range(0, int(input())):
	n = int(input())
	p = 1
	for i in range(3, 2 * n + 1):
		p = p * i % (10 ** 9 + 7)
	print(p)


M = 10 ** 9 + 7
T = int(input())
for _ in range(T):
	n = int(input())
	N = 2 * n
	if N == 2:
		print(1)
	else:
		ans = N
		while N > 3:
			ans = ans % M * ((N - 1) % M)
			N -= 1
		print(ans % M)


m = 10 ** 9 + 7

def f(n):
	zxc = 1
	for i in range(3, n + 1):
		zxc = zxc * i % m
	return zxc
t = int(input())
for _ in range(t):
	n = int(input())
	print(f(2 * n))


def factorial(n):
	res = 1
	for i in range(3, n + 1):
		res = res * i % 1000000007
	return res
for _ in range(int(input())):
	n = int(input())
	n = n * 2
	print(factorial(n))


for t in range(int(input())):
	n = int(input())
	y = 1
	for k in range(3, 2 * n + 1):
		y = y * k % 1000000007
	print(y)


def fast_factorial(n, p=1000000007):
	n = 2 * n
	if n >= p:
		return 0
	ans = 1
	for i in range(3, n + 1):
		ans = ans * i % p
	return ans
t = int(input())
for _ in range(t):
	n = int(input())
	print(fast_factorial(n))


t = int(input())
MOD = 10 ** 9 + 7
for _ in range(t):
	n = int(input())
	fac = 1
	flag = 0
	for i in range(1, 2 * n + 1):
		fac %= MOD
		fac *= i
	fac //= 2
	fac %= MOD
	print(fac)


from collections import Counter
for _ in range(int(input())):
	n = int(input())
	m = 1000000007
	if n == 1:
		print(1)
		continue
	s = 1
	for i in range(3, 2 * n + 1, 1):
		s = s * i % m
	print(s)


from sys import stdin, stdout
import math
import bisect
from collections import defaultdict, Counter
input = stdin.readline

def inp():
	return map(int, input().split())
mod = 10 ** 9 + 7

def modFact(n, p):
	if n >= p:
		return 0
	result = 1
	for i in range(3, n + 1):
		result = result * i % p
	return result
for _ in range(int(input())):
	n = int(input())
	print(modFact(2 * n, mod))


for i in range(int(input())):
	n = int(input())
	d = 1000000007
	l = 1
	for k in range(1, 2 * n + 1):
		l = l % d * k
	print(l // 2 % d)


from sys import stdin

def A():
	t = int(input())
	while t:
		t -= 1
		n = int(input())
		mod = 10 ** 9 + 7
		res = 1
		l = 3
		r = 4
		for i in range(1, n):
			res *= l * r % mod
			res %= mod
			l += 2
			r += 2
		print(res)
A()


for _ in range(int(input())):
	n = int(input())
	m = 1000000007
	res = 1
	for i in range(2 * n, 2, -1):
		res = res * i % m
	print(res % m)


for _ in [0] * int(input()):
	n = int(input())
	s = 1
	for i in range(3, 2 * n + 1):
		s = s * i % 1000000007
	print(s)


t = int(input())
for i in range(t):
	n = int(input())
	fac = 1
	fac1 = 0
	modulo = 1000000007
	b = 2 * n
	(a, bic) = (fac, fac1)
	mi = min(a, bic)
	ma = max(a, bic)
	for j in range(3, b + 1):
		tin = fac % modulo
		jin = j % modulo
		count = tin * jin
		fac = count % modulo
	fac = fac + mi + ma
	out = mi + ma
	print(fac - out)


for i in range(int(input())):
	a = int(input())
	c = 1
	for i in range(3, 2 * a + 1):
		c = c * i % 1000000007
	print(c)


Q = int(input())
mod = 10 ** 9 + 7
_inv_t = {}
_inv_t[1] = 1
_inv_t[0] = 0

def inv(x, mod):
	x %= mod
	if x not in _inv_t:
		_inv_t[x] = inv(mod % x, mod) * (mod - mod // x) % mod
	return _inv_t[x]

def main():
	N = int(input())
	ans = 1
	mod = 10 ** 9 + 7
	for i in range(1, 2 * N + 1):
		ans *= i
		ans %= mod
	print(ans * inv(2, mod) % mod)
for _ in range(Q):
	main()


def f(x):
	x *= 2
	a = 1
	for i in range(3, x + 1):
		a *= i % (10 ** 9 + 7)
		a %= 10 ** 9 + 7
	return a
t = int(input())
for i in range(t):
	print(f(int(input())))


t = int(input())
mod = 1000000007
for i in range(0, t):
	n = int(input())
	ans = 1
	for j in range(3, 2 * n + 1):
		ans = ans * j % mod
	print(ans)


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for _ in range(t):
	n = int(input())
	mod = 1000000007
	m = 2 * n
	fact = [0 for j in range(m + 1)]
	fact[1] = 1
	fact[2] = 1
	for i in range(3, m + 1):
		fact[i] = fact[i - 1] * i
		fact[i] %= mod
	ans = fact[-1]
	print(ans)


t = int(input())
while t > 0:
	n = int(input())
	mod = pow(10, 9) + 7
	if n == 1:
		print('1')
	else:
		pro = 1
		for i in range(3, 2 * n + 1):
			pro = pro * i % mod
		print(pro)
	t = t - 1


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
test_case = inp()
current_test = 0
while current_test < test_case:
	current_test += 1
	n = inp()
	ans = 1
	i = 3
	hell = 1000000007
	while i <= 2 * n:
		ans *= i
		i = i + 1
		ans %= hell
	print(ans)


n = int(input())
for time in range(n):
	t = int(input())
	ans = 1
	for x in range(1, 2 * t + 1):
		if x != 2:
			ans = ans * x % 1000000007
	print(ans)


mod = 10 ** 9 + 7
fact = [1, 1]
for i in range(2, 300010):
	fact.append(fact[-1] * i % mod)
for nt in range(int(input())):
	n = int(input()) * 2
	print(fact[n] * pow(2, mod - 2, mod) % mod)


from math import ceil, gcd, factorial
from bisect import bisect_left as bl
from bisect import bisect_right as br
from array import array
from collections import Counter as ctr
from collections import deque as dq

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

def arr(a):
	return array('i', a)

def f(n, p):
	result = 3
	for i in range(4, n + 1):
		result = result * i % p
	return result

def solve():
	p = 10 ** 9 + 7
	for _ in range(int(input())):
		n = int(input())
		if n == 1:
			print(1)
		else:
			print(f(2 * n, p))
solve()


for _ in range(int(input())):
	bhanu = int(input())
	ans = 1
	modull = 1000000007
	i = bhanu * 2
	while i > 2:
		ans = ans * i % modull
		i -= 1
	ans = ans % modull
	print(ans)


import sys
import math
input = lambda : sys.stdin.readline().strip()
t = int(input())
mod = 10 ** 9 + 7

def solve(n):
	num = 1
	for i in range(n):
		num = num * (i + 1) % mod
	return num * pow(2, mod - 2, mod) % mod
while t:
	t -= 1
	n = int(input())
	print(solve(2 * n))


for _ in range(int(input())):
	n = int(input())
	n = 2 * n
	factorial = 1
	for i in range(1, n + 1):
		if i == 2:
			continue
		factorial = factorial * i % 1000000007
	print(factorial)


MOD = 1000000007

def fact(n):
	temp = 1
	for x in range(1, n + 1):
		temp %= MOD
		temp *= x
	return temp
t = int(input())
for i in range(t):
	n = int(input())
	print(str(fact(2 * n) // 2 % MOD))


t = int(input())
for i in range(t):
	num = int(input())
	y = 1000000000.0 + 7
	total = 1
	for i in range(3, 2 * num + 1):
		total = total * i % y
	total = total % y
	print(int(total))


t = int(input())

def factorial(n):
	M = 1000000007
	f = 1
	for i in range(3, n + 1):
		f = f * i % M
	return f
for i in range(t):
	a = int(input())
	a *= 2
	print(factorial(a))


def factorial(n):
	product = 1
	mult = 1000000007
	for i in range(3, 2 * n + 1):
		product = product * i % mult
	return product
inp = int(input())
for k in range(inp):
	inp1 = int(input())
	print(factorial(inp1))


for i in range(int(input())):
	aa = int(input())
	ba = 1
	ca = 1000000000.0 + 7
	for j in range(2 * aa, 2, -1):
		ba = ba * j % ca
	ba = ba % ca
	print(int(ba))


for _ in range(int(input())):
	n = int(input())
	ans = n
	for i in range(2, 2 * n):
		ans *= i
		ans %= 1000000000.0 + 7
	print(int(ans))


import sys
input = sys.stdin.readline

def get():
	return input().strip()
for _ in range(int(get())):
	n = int(get())
	ans = 1
	for i in range(1, 2 * n + 1):
		if i == 2:
			continue
		ans = ans % 1000000007 * (i % 1000000007) % 1000000007
	print(ans)


from sys import stdin

def read_input():
	n = int(stdin.readline())
	return n

def modFact(n, p):
	if n >= p:
		return 0
	result = 1
	for i in range(1, n + 1):
		if i == 2:
			continue
		result = result * i % p
	return result

def solve(n):
	answer = modFact(2 * n, 1000000007)
	return answer

def main():
	t = int(stdin.readline())
	for _ in range(t):
		n = read_input()
		answer = solve(n)
		print(answer)
main()


t = int(input())
for i in range(t):
	n = int(input())
	ans = 1
	for k in range(3, 2 * n + 1):
		ans *= k
		ans %= 1000000007
	print(ans)


for t in range(int(input())):
	n = int(input())
	v = 1
	for i in range(3, 2 * n + 1):
		v = v * i % 1000000007
	print(v)


def calc(n, mod=10 ** 9 + 7):
	return dp[-1] * ((n - 1) % mod) % mod * (n % mod) % mod
dp = [1]
for i in range(2, 10 ** 5 + 1):
	dp.append(calc(2 * i))
for _ in range(int(input())):
	print(dp[int(input()) - 1])


import sys
pl = 1
sys.setrecursionlimit(10 ** 5)
if pl:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('outpt.txt', 'w')

def li():
	return [int(xxx) for xxx in input().split()]

def fi():
	return int(input())

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def ff():
	sys.stdout.flush()

def google(tc, *ans):
	print('Case #' + str(tc) + ':', *ans)

def bits(i, n):
	p = bin(i)[2:]
	return (n - len(p)) * '0' + p
t = fi()
f = t
mod = 10 ** 9 + 7

def check(a):
	p = 0
	for i in range(len(a) - 1):
		if a[i] < a[i + 1]:
			p += 1
	return p >= n
fa = [1] * (3 * 10 ** 5 + 2)
for i in range(1, 3 * 10 ** 5 + 1):
	fa[i] = i * fa[i - 1] % mod
while t:
	t -= 1
	n = fi()
	print(n * fa[2 * n - 1] % mod)


t = int(input())
for j in range(0, t):
	n = int(input())
	s = n
	for i in range(2, n * 2):
		s = s * i % 1000000007
	print(s)


def fact(neno):
	monkey = 1000000007
	global ff
	fragshooter = 1
	for i in range(3, 2 * neno + 1):
		fragshooter = fragshooter * i % monkey
	return fragshooter
for i in range(int(input())):
	aquaman = int(input())
	print(fact(aquaman))


itm = int(input())
n = []
m = []
for i in range(itm):
	n.append(input())
	n[i] = int(n[i])
	ir = n[i] * 2
	ans = 1
	for j in range(3, ir + 1):
		ans = ans * j % 1000000007
	m.append(ans)
for i in range(itm):
	print(m[i])


def factorial():
	global n
	a = 1
	for j in range(3, n * 2 + 1):
		a = a * j % 1000000007
	return a
t = int(input())
for i in range(t):
	n = int(input())
	fact_n = factorial()
	print(fact_n % 1000000007)


T = int(input())
for i in range(T):
	n = int(input())
	ans = 1
	for j in range(2, 2 * n):
		ans = ans * (j + 1)
		ans = ans % 1000000007
	print(round(ans % 1000000007))


import itertools
from collections import defaultdict
import itertools
import math
import sys
import bisect
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()

def li():
	return [int(i) for i in input().split()]

def lli(rows):
	return [li() for _ in range(rows)]

def si():
	return input()

def ii():
	return int(input())

def ins():
	return input().split()

def solve():
	n = II()
	mod = 10 ** 9 + 7
	ans = 1
	for i in range(3, 2 * n + 1):
		ans = ans * i % mod
	return ans

def main():
	for _ in range(II()):
		sys.stdout.write(str(solve()) + '\n')
main()


def factorial(n):
	m = 1000000007
	f = 1
	for i in range(3, 2 * n + 1):
		f = f * i % m
	return f
for i in range(int(input())):
	print(factorial(int(input())))


import math

def intlist():
	return [int(i) for i in input().split(' ')]

def stringlist():
	return input().split(' ')

def yes(t):
	if t:
		return 'YES'
	return 'NO'

def printjoin(l):
	l = [str(i) for i in l]
	return ' '.join(l)

def power_of_two(n):
	b = bin(n)[2:]
	return int(b) == 10 ** (len(b) - 1)

def bit_count(n):
	return bin(n).count('1')

def solve():
	n = int(input())
	ans = 1
	for i in range(3, 2 * n + 1):
		ans = ans * i % 1000000007
	return ans
t = input()
for tt in range(int(t)):
	print(solve())


def cuantas(n):
	if n >= 3:
		res = 3
		for i in range(4, 2 * n + 1):
			res *= i
			res = res % 1000000007
		return res
	elif n == 1:
		return 1
	else:
		return 12
N = int(input())
for i in range(N):
	print(cuantas(int(input())))


t = int(input())
for i in range(t):
	n = int(input())
	if n == 1:
		print(1)
	else:
		curr = 1
		for i in range(2, n + 1):
			curr = curr * 2 * i * (2 * i - 1)
			curr %= 1000000007
		print(curr % 1000000007)


import math as m
from collections import deque

def RI():
	return int(input())

def RF():
	return float(input())

def RS():
	return str(input())

def RIs():
	return [int(x) for x in input().split()]

def isPrime(x: int) -> bool:
	if x == 2:
		return True
	if x <= 1 or x % 2 == 0:
		return False
	for i in range(3, int(m.sqrt(x)) + 1):
		if x % i == 0:
			return False
	return True

def fact(x):
	if x == 1:
		return 1
	return x * fact(x - 1)

def perfectSquare(x: int) -> bool:
	y = int(m.sqrt(x))
	return y * y == x

def gcd(a: int, b: int) -> int:
	return a if b == 0 else gcd(b, a % b)

def lcm(a: int, b: int) -> int:
	return a * b // gcd(a, b)

def biNum(x: int):
	return '{0:b}'.format(x)

def floatPoint(x: int, y: int):
	s = '{0:.' + str(y) + 'f}'
	return s.format(x)

def main():
	n = RI()
	k = 2 * n
	INF = 1000000007
	ans = 1
	while k >= 3:
		ans = ans * k % INF
		k -= 1
	ans %= INF
	print(ans)
t = 1
t = RI()
while t:
	main()
	t -= 1


module = 10 ** 9 + 7
factorial = [1, 1]
for num in range(3, 2 * 10 ** 5 + 2):
	factorial.append(factorial[-1] * num % module)
for _ in range(int(input())):
	n = int(input())
	print(factorial[2 * n - 1])


from math import factorial
n = int(input())
for i in range(n):
	a = int(input())
	s = 1
	for i in range(3, 2 * a + 1):
		s *= i
		s %= 10 ** 9 + 7
	print(s)


def solve():
	n = int(input())
	ans = 1
	mod = 10 ** 9 + 7
	for i in range(1, 2 * n + 1):
		if i == 2:
			continue
		ans = ans * i % mod
	print(ans)
t = int(input())
for i in range(t):
	solve()


import math
num = int(input())
tests = []
for i in range(num):
	tests.append(int(input()))
for i in range(num):
	test = tests[i]
	val = 1
	for i in range(1, 2 * test + 1):
		val = val * i % (2 * 1000000007)
	print(val // 2)


import math
import heapq
import string
from collections import deque
from bisect import bisect, bisect_left, bisect_right, insort
import sys
input = sys.stdin.readline
S = lambda : input().rstrip()
I = lambda : int(S())
M = lambda : map(int, S().split())
L = lambda : list(M())
H = 1000000000 + 7
for _ in range(I()):
	n = I()
	s = p = 1
	for i in range(1, 2 * n + 1):
		if i == 2:
			continue
		s = s * i % H % H
	print(s)


import sys
MOD = 1000000007
T = int(sys.stdin.readline())
for _ in range(T):
	N = int(sys.stdin.readline())
	answer = 1
	for i in range(1, 2 * N + 1):
		answer = answer * i % MOD
	answer = answer * pow(2, -1, MOD) % MOD
	print(answer)


import itertools
from collections import defaultdict
M = 10 ** 9 + 7
t = int(input())

def solve():
	n = int(input())
	if n == 1:
		print(1)
		return
	elif n == 2:
		print(12)
		return
	add = 18
	prev = 30
	sum_n = 360
	for _ in range(n - 3):
		add += 8
		prev += add
		sum_n = sum_n * prev % M
	print(sum_n)
for _ in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	mod = 10 ** 9 + 7
	s = 1
	for i in range(3, 2 * n + 1):
		s *= i
		s %= mod
	print(s)


a = int(input())
for i in range(1, a + 1):
	a = int(input())
	k = 1
	for i in range(1, 2 * a + 1):
		k = k * i % 2000000014
	k = int(k / 2 % 1000000007)
	print(k)


from typing import Counter
import sys
from collections import defaultdict as dd
from math import *

def vinp():
	return map(int, input().split())

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

def sinp():
	return input()

def inp():
	return int(input())

def mod(f):
	return f % 1000000007

def pr(*x):
	print(*x)

def finp():
	f = open('input.txt', 'r')
	f = f.read().split('\n')
	return f

def finp():
	f = open('input.txt', 'r')
	f = f.read().split('\n')
	return f

def fout():
	return open('output.txt', 'w')

def fpr(f, x):
	f.write(x + '\n')

def csort(c):
	sorted(c.items(), key=lambda pair: pair[1], reverse=True)

def indc(l, n):
	c = {}
	for i in range(n):
		c[l[i]] = c.get(l[i], []) + [i + 1]
	return c
cou = inp()
for _ in range(cou):
	n = inp()
	f = 1
	for i in range(3, 2 * n + 1):
		f = mod(f * i)
	pr(f)


T = int(input())
for _ in range(T):
	n = int(input())
	ans = 1
	for i in range(3, 2 * n + 1):
		ans = ans * i % 1000000007
	print(ans)


import math
for i in range(int(input())):
	a = int(input())
	mod = 10 ** 9 + 7
	if a == 1:
		print(1)
	else:
		u = 2 * a - 1
		ans = a
		while u != 0:
			ans = ans * u % mod
			u -= 1
		print(ans)


from math import factorial
MOD = 10 ** 9 + 7

def solve(n):
	result = 1
	for i in range(1, 2 * n + 1):
		result = result * i % MOD
	if result % 2:
		return (result + MOD) // 2
	else:
		return (result // 2 + MOD) % MOD
for _ in range(int(input())):
	n = int(input())
	print(solve(n))


t = int(input())
n = [[2 * int(input()), _] for _ in range(t)]
n.sort()
ans = [1] * t
prev = 2
an = 1
for i in range(t):
	k = n[i][0]
	if k <= 2:
		ans[n[i][1]] = an
	else:
		while prev < k:
			prev += 1
			an = an * prev % 1000000007
		ans[n[i][1]] = an % 1000000007
print(*ans, sep='\n')


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

def I():
	return int(input())

def solve():
	n = I()
	if n == 1:
		print(1)
	elif n == 2:
		print(12)
	else:
		ans = 1
		for i in range(3, 2 * n + 1):
			ans *= i
			ans %= 1000000007
		print(ans)
for _ in range(int(input())):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	m = 10 ** 9 + 7
	res = 1
	for j in range(2 * n, 2, -1):
		res = res * j % m
	print(res % m)


for _ in range(int(input())):
	f = 1
	n = int(input())
	mod = 10 ** 9 + 7
	flag = 0
	for i in range(1, 2 * n + 1):
		f *= i
		if not f % 2:
			if not flag:
				f //= 2
				flag = 1
		f %= mod
	print(f)


from sys import stdin, gettrace
if gettrace():

	def inputi():
		return input()
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()
LIMIT = 200001
MOD = 1000000007

def solve(factorial):
	n = int(input())
	print(factorial[2 * n] * pow(2, MOD - 2, MOD) % MOD)

def main():
	factorial = [1]
	for i in range(1, LIMIT):
		factorial.append(factorial[-1] * i % MOD)
	t = int(input())
	for _ in range(t):
		solve(factorial)
main()


import os, sys, math
from io import BytesIO, IOBase
ip = lambda : input()
it = lambda : int(input())
ma = lambda : map(int, input().split(' '))
li = lambda : list(map(int, input().split(' ')))
mod = 10 ** 9 + 7
md = 998244353

def do(a, n, l, r, d):
	x = []
	z = a[l:r + 1]
	t = len(z)
	z = z + z
	for i in range(t):
		x.append(z[d + i])
	for i in range(l, r + 1):
		a[i] = x[i - l]
	return

def main():
	for _ in range(int(input())):
		n = it()
		z = 1
		for i in range(3, 2 * n + 1):
			z *= i
			z %= mod
		print(z)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import os
import sys
from io import BytesIO, IOBase
_str = str
str = lambda x=b'': x if type(x) is bytes else _str(x).encode()
BUFSIZE = 8192

class FenwickTree:

	def __init__(self, x):
		self.bit = x
		for i in range(len(x)):
			j = i | i + 1
			if j < len(x):
				x[j] += x[i]

	def update(self, idx, x):
		while idx < len(self.bit):
			self.bit[idx] += x
			idx |= idx + 1

	def query(self, end):
		x = 0
		while end:
			x += self.bit[end - 1]
			end &= end - 1
		return x

	def findkth(self, k):
		idx = -1
		for d in reversed(range(len(self.bit).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(self.bit) and k >= self.bit[right_idx]:
				idx = right_idx
				k -= self.bit[idx]
		return idx + 1

def main():
	mod = 10 ** 9 + 7
	l = [0] * (2 * 10 ** 5 + 1)
	ans = 1
	for i in range(1, 2 * 10 ** 5 + 1):
		ans = ans * i % mod
		if i % 2 == 0:
			l[i] = ans * pow(2, mod - 2, mod) % mod
	for _ in range(int(input())):
		n = int(input())
		print(l[2 * n])
main()

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')


mod = 10 ** 9 + 7
d = {}
d[2] = 1
temp = 1
for i in range(3, 200001):
	temp *= i % mod
	temp %= mod
	d[i] = temp
for _ in range(int(input())):
	n = int(input())
	print(d[2 * n])


t = int(input())
mod = 1000000007
for k in range(t):
	out = 1
	n = int(input())
	for i in range(3, n * 2 + 1):
		out *= i
		out %= mod
	print(out)


import sys
mod = 1000000007
fact = [1] * 200002
for i in range(3, 200002):
	fact[i] = i * (fact[i - 1] % mod) % mod
for _ in range(int(input().strip())):
	n = int(input().strip())
	ans = fact[n * 2] % mod
	print(ans)