import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in)) { int N = sc.nextInt(); char[] S = sc.next().toCharArray(); final int MOD = 998_244_353; final int LESS = 0, EQUAL = 1; long[][][] dp = new long[2][2][N + 1]; dp[EQUAL][0][0] = 1; for (int i = 0;i < N;++ i) { if (S[i] != 'a') { dp[EQUAL][0][i + 1] = dp[EQUAL][0][i]; dp[EQUAL][1][i + 1] = dp[EQUAL][1][i]; } else dp[EQUAL][1][i + 1] = dp[EQUAL][0][i]; dp[LESS][0][i + 1] = dp[EQUAL][0][i] * Math.max(0, S[i] - 'b'); dp[LESS][0][i + 1] += dp[LESS][0][i] * 25; dp[LESS][0][i + 1] %= MOD; if (S[i] != 'a') dp[LESS][1][i + 1] = dp[EQUAL][0][i]; dp[LESS][1][i + 1] += dp[EQUAL][1][i] * Math.max(0, S[i] - 'b'); dp[LESS][1][i + 1] += dp[LESS][0][i]; dp[LESS][1][i + 1] += dp[LESS][1][i] * 25; dp[LESS][1][i + 1] %= MOD; } System.out.println(dp[LESS][1][N]); } } }