BIGFIBB - Interesting determinant

Consider the following n×n matrix:

Calculate the determinant of such matrix given some n

Input

The first line of the input contains number t – the number of tests. Then t test descriptions follow. Each test consist of a single integer n.

Constraints

1 <= t <= 1000
1 <= n <= 1015

Output

For each test print the determinant of the matrix modulo 1000000007.

Example

Input:
3
1
2
3

Output:
1
2
3

Added by:Spooky
Date:2009-11-24
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 NODEJS OBJC PERL6 SQLITE VB.NET

hide comments
2012-09-03 14:46:05 Amit Gupta
can you provide some big testcases for this? I'm getting WA, but I've tested on some numbers and the results seem ok to me..
2009-11-25 03:52:50 abhijith reddy d
A Problem in Knuth Fundamental algorithms :)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.