NOVICE66 - SHAKE

no tags 

Consider a meeting of n businessmen sitting around a circular table. To start the meeting, they must shake hands. We say that the shake is perfect if no arms cross each other and each businessman shakes the hand of exactly one other businessman. All handshakes happen simultaneously.

Input

First line contains an integer T(less than 5000) denoting the total number of test cases.

Each test case consists of a single integer n(1 <= n <= 5000) in one line.

Output

For each tese case, print the number of perfect shakes that exist for n businessmen modulo 1000000007.

Example

Input:
1
6
Output:
5

hide comments
asg_ardian1311: 2023-11-01 11:52:08

@bhaveshag Catalan numbers. I just noticed this, I hope you still want to solve this

not_found: 2012-04-25 02:02:40

can anyone post some more testcases


Added by:amit karmakar
Date:2011-07-03
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64