#include<iostream>
#include<algorithm>
#include<cmath>
#include<ctime>
#include<vector>
#define ll long long
using namespace std;
void solve()
{
//B. Marin and Anti-coprime Permutation
ll n;
cin >> n;
if (n % 2 ==1)
{
cout << 0 << "
";
}
else
{
ll sum = 1;
for (int i = 1; i <= n / 2; i++)
{
sum = (i * sum) % 998244353;
}
sum *= sum;
cout << sum % 998244353 << "
";
}
}
int main()
{
int t;
cin >> t;
while (t--)
{
solve();
}
return 0;
}