import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(br.readLine()); int mod = 998244353; long[][] a = new long[2][2]; a[0][0] = 26; a[0][1] = 26; a[1][0] = 0; a[1][1] = 1; long[] c = new long[] {26, 1}; PrintWriter pw = new PrintWriter(System.out); for (int z = 0; z < t; z++) { long l = Long.parseLong(br.readLine()) - 1; if (l == 0) { pw.println(26); continue; } long[][] b = matrixPow(a, l, mod); long[] d = matrixMul1(c, b, mod); long ans = d[1] + 25; if (ans >= mod) ans -= mod; pw.println(ans); } pw.flush(); br.close(); } static long[][] matrixPow(long[][] a, long k, int m) { if (k == 1) { return a; } long[][] ret = matrixPow(a, k / 2, m); ret = matrixMul(ret, ret, m); if (k % 2 == 1) { ret = matrixMul(ret, a, m); } return ret; } static long[][] matrixMul(long[][] a, long[][] b, int m) { int h = a.length; int w = b[0].length; int n = a[0].length; long[][] c = new long[h][w]; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { for (int x = 0; x < n; x++) { c[i][j] += a[i][x] * b[x][j]; c[i][j] %= m; } } } return c; } static long[] matrixMul1(long[] a, long[][] b, int m) { int w = b[0].length; int n = a.length; long[] c = new long[w]; for (int j = 0; j < w; j++) { for (int x = 0; x < n; x++) { c[j] += a[x] * b[x][j]; c[j] %= m; } } return c; } }