#include using namespace std; using ll = long long; const ll mod = 998244353; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); vector C(21); for (int i = 1; i < 21; i++) { for (int a = 0; a <= i; a++) { for (int b = 0; b <= i - a; b++) { for (int c = 0; c <= i; c++) { for (int d = 0; d <= i - c; d++) { if (a + c <= i && b + d <= i && i <= a + b + c + d) { C[i]++; } } } } } } vector ans(1e6 + 1, 1); vector M(1e6 + 1); iota(M.begin(), M.end(), 0); for (int i = 2; i <= 1e6; i++) { if (M[i] == i) { for (int j = i; j <= 1e6; j += i) { int e = 0; while (M[j] % i == 0) { e++; M[j] /= i; } ans[j] = ans[j] * C[e] % mod; } } } int T; cin >> T; while (T--) { int K; cin >> K; cout << ans[K] << '\n'; } }