#P387. 练67.1  斐波那契数列

练67.1  斐波那契数列

Description

The Fibonacci sequence is defined as follows: the first and second numbers are both 11, and each subsequent number is the sum of the previous two numbers. Given a positive integer aa, find the aa-th number in the Fibonacci sequence modulo 10001000.

Input Format

The first line contains the number of test cases nn, followed by nn lines of input. Each test case consists of a single line with a positive integer aa (1a10000001\leq a\leq 1000000).

Output Format

Output nn lines, each containing the result for the corresponding input. The output should be a positive integer, which is the aa-th Fibonacci number modulo 10001000.

Sample

4
5
2
19
1
5
1
181
1