N = int(input()) S = input() n = set(list('yukicoder')) dic = {i:idx for idx,i in enumerate('yukicoder')} dp = [[[0]*2 for _ in range(9)] for _ in range(N)] if S[0]=='y': dp[0][0][0] = 1 if S[0]=='?': dp[0][0][1] = 1 mod = 10**9+7 for i in range(1,N): for j in range(9): for k in range(2): dp[i][j][k] += dp[i-1][j][k] dp[i][j][k] %= mod if S[i] in n: idx = dic[S[i]] if idx==0: dp[i][idx][0] += 1 dp[i][idx][0] %= mod else: dp[i][idx][0] += dp[i-1][idx-1][0] dp[i][idx][1] += dp[i-1][idx-1][1] dp[i][idx][0] %= mod dp[i][idx][1] %= mod elif S[i]=='?': for j in range(9): if j==0: dp[i][j][1] += 1 dp[i][j][1] %= mod else: dp[i][j][1] += dp[i-1][j-1][0] dp[i][j][1] %= mod print((dp[-1][-1][0]+dp[-1][-1][1])%mod)