Counting Music Scores

Count scores over two pitches and two durations with n seconds total, balanced pitch counts, at least as many long notes as short, and alternating pitches starting low.

Medium5CombinatoricsDynamic programmingMathNo attempts yetTime limit2sMemory limit512 MB

Problem

You build a musical score by writing notes one after another. Each note has one of two pitches, low or high, and one of two durations, short or long. A short note lasts 1 second and a long note lasts 2 seconds. The score must satisfy all of the following.

a) The total duration of the score is a given integer nn seconds.
b) The number of low short notes equals the number of high short notes.
c) The number of low long notes equals the number of high long notes.
d) The number of long notes is at least the number of short notes.
e) Low notes and high notes alternate.
f) The first note is low.

Given an even integer nn, count the scores that satisfy every condition. Writing each note as its duration, the 4 scores for n=6n = 6 are 2211, 2112, 1221 and 1122. Conditions e and f force every odd numbered note to be low and every even numbered note to be high. For n=8n = 8 the only score is 2222.

Input

The first line contains the number of test cases tt (1t100001 \le t \le 10000).
Each of the next tt lines contains one even integer nn (2n1002 \le n \le 100).

Output

For each test case, print on its own line the number of scores that satisfy every condition. The answer is smaller than 2632^{63}.