#include <iostream>
using namespace std;
int main() {
int n, k;
long long brackets [33];
brackets [0] = 1;
for(int i = 1; i <= 32; ++ i){
brackets [i]=0;
for(int j = 0; j < i; ++ j){
brackets [i] += brackets [j] * brackets [i - 1 - j];
}
}
cin >> n;
for (int i = 0; i < n; i ++) {
cin >> k;
cout << (k % 2 == 0 ? brackets [k / 2] : 0) << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbiwgazsKCWxvbmcgbG9uZyBicmFja2V0cyBbMzNdOwoJYnJhY2tldHMgWzBdID0gMTsKCWZvcihpbnQgaSA9IDE7IGkgPD0gMzI7ICsrIGkpewoJCWJyYWNrZXRzIFtpXT0wOwoJCWZvcihpbnQgaiA9IDA7IGogPCBpOyArKyBqKXsKCQkJYnJhY2tldHMgW2ldICs9IGJyYWNrZXRzIFtqXSAqIGJyYWNrZXRzIFtpIC0gMSAtIGpdOwoJCX0KCX0KCWNpbiA+PiBuOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpICsrKSB7CgkJY2luID4+IGs7CgkJY291dCA8PCAoayAlIDIgPT0gMCA/IGJyYWNrZXRzIFtrIC8gMl0gOiAwKSA8PCBlbmRsOwoJfQoJcmV0dXJuIDA7Cn0=