Long Grid Covering

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

We have a grid of height 33 and width nn, as well as pieces that occupy 33 adjacent cells. Given nn, determine the number of ways to fill the grid so that each cell is covered by exactly one piece and no piece sticks out of the grid. Here there is an example of a way to fill a grid of width 44:

Notice that any piece will be a rotation of one of the pieces of this example. Find the answers modulo 109+710^9 + 7.

입력

The first line contains an integer tt, the number of test cases (1t1001 \leq t \leq 100).

Each test case is given on a separate line containing an integer nn (1n10181 \leq n \leq 10^{18}), the width of the grid.

출력

For each test case, print a line with a single integer: the number of ways to fill the grid with aforementioned conditions modulo 109+710^9 + 7.