K. Unique Tournaments
time limit per test
0.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

A multiset $$$S$$$ is said to be $$$n$$$-admissible if there exists some tournament graph on $$$n$$$ vertices whose multiset of outdegrees is $$$S$$$.

An $$$n$$$-admissible multiset $$$S$$$ is good if there exists a unique tournament graph on $$$n$$$ vertices (up to isomorphism) whose multiset of outdegrees equals $$$S$$$.

Find the number of good $$$n$$$-admissible multisets with all elements being even integers.

Input

The first line contains a single integer $$$t$$$ $$$(1 \leq t \leq 10^5)$$$ — the number of test cases.

The only line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 10^{18})$$$.

Output

For each test case, print a single integer on a new line, the number of good $$$n$$$-admissible multisets with all elements being even integers, modulo $$$10^9 + 7$$$.

Example
Input
5
4
6
3
8
121
Output
1
0
0
2
2178309
Note

A tournament graph is a directed graph with no self-loops such that for each pair of vertices $$$u \ne v$$$, exactly one of the edges $$$u \to v$$$ and $$$v \to u$$$ exists.