SP4166 HS08FOUR - Four colors
Description
Let there be given _n_ points: P $ _{1} $ ,P $ _{2} $ ...,P $ _{n} $ arranged in this order on a line. We would like to color them using four colors: white, black, red, and blue, in such a way that for every three consecutive points it is true that either
**1.** the colors of these three points are pairwise distinct, or
**2.** the color of some point is white.
Input Format
An integer _T_, denoting the number of testcases (_T_
Output Format
Find the number of possible colorings of the _n_ points. Since the answer can be very big, output only the answer modulo 1000000007.