#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using namespace std; typedef long long ll; template vector> vec2d(int n, int m, T v){ return vector>(n, vector(m, v)); } template vector>> vec3d(int n, int m, int k, T v){ return vector>>(n, vector>(m, vector(k, v))); } template void print_vector(vector v, char delimiter=' '){ if(v.empty()) { cout << endl; return; } for(int i = 0; i+1 < v.size(); i++) cout << v[i] << delimiter; cout << v.back() << endl; } using mint = atcoder::modint998244353; ostream& operator<<(ostream& os, const mint& m){ os << m.val(); return os; } bool is_p(string s){ string t = s; reverse(t.begin(), t.end()); return s == t; } bool ok(string s){ if(is_p(s)) return false; int n = s.size(); for(int i = 0; i < n; i++){ string t; for(int j = 0; j < n; j++){ if(i == j) continue; t += s[j]; } if(is_p(t)) return true; } return false; } mint naive(int n){ string s; mint ans = 0; function dfs = [&](int i){ if(i == n){ if(ok(s)){ ans++; } return; } for(int x = 0; x < 26; x++){ s += 'a'+x; dfs(i+1); s.pop_back(); } }; dfs(0); return ans; } mint solve(int n){ if(n == 1){ return mint(0); } if(n == 2){ return mint(26)*25; } mint ans = mint(26)*25*mint(26).pow(n/2-1); mint x = 2*((n-1)/2); if(n%2 == 0) x++; ans *= x; if(n%2 == 0){ int m = (n-4)/2; ans -= 26*25*(mint(26).pow(m+1)-1)/25; } return ans; } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; int t; cin >> t; while(t--) { int n; cin >> n; cout << solve(n) << endl; } }