HOLIDAYS ARE COMING!
Last day of the advanced algorithmic classes and two siblings are walking in a big corridor. But one of the twins asks his brother: “Do you know in how many ways we can walk through this corridor?”
The corridor is L meters long and it is represented as a 2 × L grid. Initially, twin A is at (1,1) and twin B is at (2,1), and they set the rules to move along the corridor:
For a given L > 1, return the number of of ways in which the twins can walk through the corridor. Because this number could be very large, return the result modulo 109 + 7.
Input
The input starts with the number of test cases T ≤ 1000. For each test case, there is an integer L ≤ 106 representing the length of the corridor.
Output
For each test case, output an integer on a single line representing the number of ways in which the twins can walk through the corridor, modulo 109 + 7.
In the first example there are 8 combinations:
Input
2 2 3
Output
8 72