{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eGod Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisonous.\u003c/p\u003e\u003cp\u003eEvery hour, God Water will eat one kind of food among meat, fish and chocolate. If there are $3$ continuous hours when he eats only one kind of food, he will be unhappy. Besides, if there are $3$ continuous hours when he eats all kinds of those, with chocolate at the middle hour, it will be dangerous. Moreover, if there are $3$ continuous hours when he eats meat or fish at the middle hour, with chocolate at other two hours, it will also be dangerous.\u003c/p\u003e\u003cp\u003eNow, you are the doctor. Can you find out how many different kinds of diet that can make God Water happy and safe during $N$ hours? Two kinds of diet are considered the same if they share the same kind of food at the same hour. The answer may be very large, so you only need to give out the answer module $1000000007$.\u003c/p\u003e\u003ch3\u003eInput\u003c/h3\u003e\u003cp\u003eThe fist line puts an integer $T$ that shows the number of test cases. ($T \\le 1000$)\u003c/p\u003e\u003cp\u003eEach of the next $T$ lines contains an integer $N$ that shows the number of hours. ($1 \\le N \\le 10^{10}$)\u003c/p\u003e\u003ch3\u003eOutput\u003c/h3\u003e\u003cp\u003eFor each test case, output a single line containing the answer.\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\n3\n4\n15\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e20\n46\n435170\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr /\u003e"}}]}