#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i) #define all(a) (a).begin(),(a).end() #include using namespace atcoder; using mint = modint998244353; int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); vector R(2e5 + 10), E(2e5 + 10); R[1] = 1, R[2] = 1; E[1] = 1, E[2] = 3; rep(i, 3, 2e5 + 10) { R[i] = R[i - 1] + R[i - 2]; E[i] = E[i - 1] + E[i - 2]; } int Q; cin >> Q; rep(query, 0, Q) { int N; cin >> N; mint ans = 5 * R[N].pow(2) - E[N].pow(2); cout << ans.val() << '\n'; } }