#include #include #include using namespace std; const int MOD = 998244353; map mf, mg; //26^N long long g(long long N) { if (mg[N]) return mg[N]; if (N == 0) return 1; if (N == 1) return 26; if (N % 2 == 1) { return mg[N] = (26 * g(N - 1)) % MOD; } long long tmp = g(N / 2); return mg[N] = tmp * tmp % MOD; } long long f(long long L) { if (mf[L]) return mf[L]; if (L == 0) return 0; if (L == 1) return 26; if (L % 2 == 1) { return mf[L] = (26 + 26 * f(L - 1)) % MOD; } return mf[L] = (f(L / 2) + g(L / 2) * f(L / 2) % MOD) % MOD; } int main() { int T; cin >> T; while (T--) { long long L; cin >> L; cout << f(L) << endl; } }