Ensure that you are logged in and have the required permissions to access the test.
Let p1,p2,...,pn be a permutation of 1,2,...,n.
An optimistic permutation follows pi>i−2∀i∈[1,n].
An over-optimistic permutation has the following properties:
Given n, find the count of all over-optimistic permutations modulo 109+7.
Input:
The first line contains T - the number of testcases, followed by T lines each containing one integer n.
Output:
For each testcase print the answer on a newline.
Constraints:
For n=3, the only possible over-optimistic permutation is {3,1,2}.