Partition

Time Limit: 3000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 4651
64-bit integer IO format: %I64d      Java class name: Main

Description

How many ways can the numbers 1 to 15 be added together to make 15? The technical term for what you are asking is the "number of partition" which is often called P(n). A partition of n is a collection of positive integers (not necessarily distinct) whose sum equals n.

Now, I will give you a number n, and please tell me P(n) mod 1000000007.

Input

The first line contains a number T(1 ≤ T ≤ 100), which is the number of the case number. The next T lines, each line contains a number n(1 ≤ n ≤ 105) you need to consider.

Output

For each n, output P(n) in a single line.

Sample Input

4
5
11
15
19

Sample Output

7
56
176
490

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .