#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define MOD 998244353 using ll = long long int; int main() { int ni = 2e5; vector R(ni, 1); vector E(ni, 1); E[1] = 3; rep(i, ni-2) { R[i+2] = (R[i] + R[i+1]) % MOD; E[i+2] = (E[i] + E[i+1]) % MOD; } int Q; cin >> Q; rep(i, Q) { int Ni; cin >> Ni; int ans = ((ll)R[Ni-1] * (ll)R[Ni-1] * 5) % MOD; ans -= ((ll)E[Ni-1] * (ll)E[Ni-1]) % MOD; if (ans < 0) ans += MOD; cout << ans << endl; } return 0; }