Army of Planet kepler-186f is using the war technique LimeLight in universe war-1 And Attacking many of the Planet in the universe it seem that they are Unstoppable But one of the Scientist of Earth(Nimit bhardwaj aka lord poseidon ) After A long Research Found that we can Win over them if we know their strength of attack.But this was Rejected By Group Of Scientist (Cheema,sahoo and vishal) Nimit being very angry decided to prove them wrong so He seek help from you. Help him to find the strength of the Attack
Limelight is a technique that is used when all four Armymen take place in the cardinal directions. They will then join their strength in the form of four connecting streams above the target area. It will then create a massive ball of lightning powerful enough to incinerate everything within the area of the four users.
The Leaf village on Earth is build in the shape of Spiral of integers. Spiral of integers, of an integer N is an interesting N∗N spiral matrix which starts with 1 at the center. For example, for N=4 the spiral of integers is
16 15 14 13
5 4 3 12
6 1 2 11
7 8 9 10
Ratan,Samurai Samridhi,Prashant kaushal,Python the Destroyer four Armymen of the planet kepler-186f are planning to destroy the whole Leaf village. The limelight spot will be the 4 corners of the village. Strength of the attack is equal to the sum of all the elements in the connecting streams as shown in the figure ( sum of diagonal elements of the spiral of integers of N ) .Given the value of N, you need to compute the strength of the attack (mod 10^9+9).Give the data to the Nimit
Input:---
First line contains an integer T, denoting the number of testcases.Each test case consists of a single integer N.
Output:---
For each test case output a single integer denoting the strength of the attack (mod 10^9+9).
Constraints:
1≤T≤10^5
1≤N≤10^7
Explanation First test case: Sum of the diagonal elements will be 16+4+2+10+13+3+1+7=56.
Second test case:find it.