const MOD: usize = 1e9 as usize + 7; fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s = s.trim().chars().collect::>(); let LIMIT = 10; let mut dp = vec![vec![vec![0usize; LIMIT]; 2]; n+1]; dp[0][0][0] = 1; for i in 0..n { for pat in 0..2 { for j in 0..LIMIT { dp[i+1][pat][j] += dp[i][pat][j]; } match s[i] { 'y' => { dp[i+1][pat][1] += dp[i][pat][0]; dp[i+1][pat][1] %= MOD; }, 'u' => { dp[i+1][pat][2] += dp[i][pat][1]; dp[i+1][pat][2] %= MOD; }, 'k' => { dp[i+1][pat][3] += dp[i][pat][2]; dp[i+1][pat][3] %= MOD; }, 'i' => { dp[i+1][pat][4] += dp[i][pat][3]; dp[i+1][pat][4] %= MOD; }, 'c' => { dp[i+1][pat][5] += dp[i][pat][4]; dp[i+1][pat][5] %= MOD; }, 'o' => { dp[i+1][pat][6] += dp[i][pat][5]; dp[i+1][pat][6] %= MOD; }, 'd' => { dp[i+1][pat][7] += dp[i][pat][6]; dp[i+1][pat][7] %= MOD; }, 'e' => { dp[i+1][pat][8] += dp[i][pat][7]; dp[i+1][pat][8] %= MOD; }, 'r' => { dp[i+1][pat][9] += dp[i][pat][8]; dp[i+1][pat][9] %= MOD; }, '?' => { if pat == 0 { for k in 0..LIMIT-1 { dp[i+1][pat+1][k+1] += dp[i][pat][k]; dp[i+1][pat+1][k+1] %= MOD; } } dp[i+1][1][0] = 25; }, _ => {}, }; } } println!("{}", (dp[n][0][LIMIT-1] + dp[n][1][LIMIT-1]) % MOD); }