#include #include #include #include #include #include using namespace std; typedef long long LL; typedef vector VI; #define REP(i,n) for(int i=0, i##_len=(n); i inline void amin(T &x, const T &y) { if (y inline void amax(T &x, const T &y) { if (x void rprintf(const char *fmt, Iter begin, Iter end) { for (bool sp=0; begin!=end; ++begin) { if (sp) putchar(' '); else sp = true; printf(fmt, *begin); } putchar('\n'); } const LL MOD = 663224321; LL Z[] = { 1,1,1,4,38,728,26704,1866256,251548592,637083293,201986643,445470011,383172888,385948552,65297001,308964152, }; int main() { int Q; scanf("%d", &Q); REP ($, Q) { int N; scanf("%d", &N); printf("%lld\n", Z[N]); } return 0; }