Kamaldeep is good at making pizzas. Generally he gets requests to serve N pizzas at once. He serves them in the form of a stack. A pizza should be treated as a circular disk with some radius.

Kamaldeep needs to take care that when he places a pizza on the top of the stack the radius of the pizza should not exceed the radius of the largest pizza in the stack by more than 1. Additionally all radii should be positive integers, and the bottom most pizza should have its radius as 1. Kamaldeep is week in maths :P, so he wants you to find out in how many ways can he create a stack containing N pizzas.

Input

First line of the input contains T (T ≤ 1000) denoting the number of test cases.

T lines follow each containing a single integer N (1 ≤ N ≤ 1000) denoting the size of the required stack.

Output

For each case the output should be a single integer representing the number of ways a stack of size N can be created. As 

the answer can be large print it modulo 1000000007.

SAMPLE INPUT
2
1
2

SAMPLE OUTPUT
1
2

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
bellArr = [[0 for x in range(1000)] for x in range(1000)]
bellArr[0][0] = 1
bellArr[1][0] = 1
bellArr[1][1] = 2
cnt = 0
for i in range(1, 999):
	j = 0
	bellArr[i+1][0] = bellArr[i][i]
	for j in range(1, i+2):
		bellArr[i+1][j] = bellArr[i+1][j-1] + bellArr[i][j-1]

for x in range(1, 1000):
	bellArr[x][0] = bellArr[x][0] % 1000000007

resp = eval(input(""))
g = 1
while g <= int(resp):
	va = eval(input(""))
	print((bellArr[int(va)][0]))
	g = g + 1