Given an empty grid with 4 rows and n columns, count the number of ways to fill the grid with 0's and 1's, such that for all the 4 x 4 subgrids, they contain an equal amount of 1's in them. Since the number of ways could be quite large, you should find it modulo 109+7.
Note: It is possible to have zero 1's in the subgrids.
A subgrid is a grid made up of a subset of the larger grid.
Input format
Output format
Your program should output t lines, each line denoting the total number of ways to fill a grid of 4 rows and ni columns modulo 109+7 for the ith test case.
Constraints
1≤t≤10004≤ni≤1018
In the sample input, we have one test case with n=5.
Below are some 4 x 5 grids that satisfy the condition, with the 4 x 4 subgrids highlighted.