N = int(input()) S = list(str(input())) MOD = 10**9+7 alp = list(' yukicoder') dp = [[[0,0] for _ in range(11)] for _ in range(N+1)] dp[0][0][0] = 1 for i in range(1,N+1): s = S[i-1] for j in range(10): dp[i][j][0] = dp[i-1][j][0] dp[i][j][1] = dp[i-1][j][1] if s != '?': for k in range(10): if s == alp[k]: j = k break dp[i][j][0] += dp[i-1][j-1][0] dp[i][j][0] %= MOD dp[i][j][1] += dp[i-1][j-1][1] dp[i][j][1] %= MOD else: for k in range(1,10): dp[i][k][1] += dp[i][k-1][0] dp[i][k][1] %= MOD print(dp[N][9][0]+dp[N][9][1])