#include #include #include #include using namespace std; using namespace atcoder; using mint = atcoder::modint998244353; const int MOD = 998244353; map mf; mint f(long long L) { if (mf[L] != 0) 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)); } return mf[L] = f(L / 2) + mint(26).pow(L / 2) * f(L / 2); } int main() { int T; cin >> T; while (T--) { long long L; cin >> L; cout << f(L).val() << endl; } }