#include #ifdef LOCAL #include "./debug.cpp" #else #define debug(...) #define print_line #endif using namespace std; using ll = long long; int mod = 998244353; vector memo1(200001, -1), memo2(200001, -1); int R(int i) { if (memo1[i] != -1) return memo1[i]; if (i == 1) return 1; if (i == 2) return 1; memo1[i] = (R(i - 1) + R(i - 2)) % mod; return memo1[i]; } int E(int i) { if (memo2[i] != -1) return memo2[i]; if (i == 1) return 1; if (i == 2) return 3; memo2[i] = (E(i - 1) + E(i - 2)) % mod; return memo2[i]; } int main() { int Q; cin >> Q; while (Q--) { int N; cin >> N; ll r = 1ll * R(N) * R(N) * 5 % mod, e = 1ll * E(N) * E(N) % mod; cout << (r - e + mod) % mod << '\n'; } }