tom-in-gym

The Tom has become health conscious and is now lifting weights at the gym. But its his first time so the trainer gives him a simple job to do.

He has been given a weight lifting rod and N heavy weights, each weighing 2^0, 2^1, .... , 2^n-1. He has to stick each of the "N" weights on the rod, one after another, in such a way that the right side is never heavier than the left side. At each step he chooses one of the weights that has not yet been fixed on the rod, and fix it on either the left side of the rod or the right, until all of the weights have been placed. Now help the Tom and find out, in how many ways the Tom can accomplish this?

Input

First line of input contains an integer T, the number of test cases. Then T test cases follow. Each line of test case contains one integer, N denoting the number of weights

Output

The output contains T lines, each containing an integer denoting all possible combinations. 

SAMPLE INPUT
4
2
5
4
7

SAMPLE OUTPUT
3
945
105
135135

Source: hackerearth | Difficulty: MEDIUM


Solutions:
import sys
     
N=80
ans=[1]
i=1
while i < N:
	ans.append(ans[i-1] * (2*i-1))
	i = i+1
	 
T=int(sys.stdin.readline().strip())
while T > 0:
	n=int(sys.stdin.readline().strip())
	print(ans[n])
	T=T-1;


t=int(input())
while(t>0):
	n=int(input())
	ans=1
	x=3
	while(x<2*n):
		ans=ans*x
		x=x+2
	print(ans)
	t=t-1


t=int(input())
while(t>0):
	n=int(input())
	ans=1
	x=3
	while(x<2*n):
		ans=ans*x
		x=x+2
	print(ans)
	t=t-1


import sys

n=eval(input())
count=0
while(count<n):
	x=eval(input())
	x=x-1
	count1=1
	res=1
	while(count1<=2*x+1):
		res=res*count1
		count1=count1+2
	count=count+1
	print(res)