Define to be the length of the shortest subsequence of array (with length greater than ) which is a palindrome.
If there is no palindrome subsequence of length , then f(a) = 0.
Calculate \sum f(a) over all arrays of length with integers from to . Output the answer modulo 10^9 + 7
Formally , Compute
You are given test cases. Please answer all of them.
Note:
A subsequence is a sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements.
A palindrome is a sequence that reads the same forwards and backwards.
The first line contains single integer (1 \le t \le 10^4) — the number of test cases.
The only line of each test case contains a single integer (1 \le n \le 10^6) — the length of desired arrays.
There are no constraints on the sum of
For each test case , Output the answer modulus 10^9+7.
Example 1
With n = 2, there are possible arrays:
Calculating for each:
f([1, 1]) = 2
f([1, 2]) = 0
f([2, 1]) = 0
f([2, 2]) = 2
So the total sum is 2 + 0 + 0 + 2 = 4.
Subtask ( points): (1\le n \le 6)
Subtask ( points): (1\le n \le 9)
Subtask ( points): No additional constraints