You are given a natural number N. A sequence A=(A0,A1,…,AN−1) of length N is self-describing when the following holds for every i with 0≤i<N.
Ai equals the number of times the value i occurs in A.
Count the self-describing sequences of length N.
The first line contains a natural number T, the number of test cases. Each of the next T lines contains one sequence length N (1≤N≤100).
For each test case, print on one line the number of self-describing sequences of length N, taken modulo 1,000,000,007.
For N=5 the only sequence that satisfies the condition is (2,1,2,0,0). For N=4 there are two, (2,0,2,0) and (1,2,1,0).