New Fibonacci Sequence#158

New Fibonacci Sequence

1 second
64 megabytes
Medium

A new Fibonacci sequence is defined as follows: the first four terms are all equal to one, and each subsequent term is the sum of the four preceding terms.

Input

The first line contains the integer (1 \leq T \leq 1000), the number of test cases. The next line contains integers — the indices of the terms in the sequence you need to find.

Output

Output lines, each containing the specified term of the new sequence.

The number of digits in each term does not exceed .

Examples

Example 1

Loading
Loading