def main(): N=int(input()) S=input() dp=[[0]*2 for i in range(9)] mod=10**9+7 u={"y":0,"u":1,"k":2,"i":3,"c":4,"o":5,"d":6,"e":7,"r":8} t=list("yukicoder") for i in range(N): if S[i]==t[0]: dp[0][0]+=1 dp[0][0]%=mod elif S[i] in t: for j in range(1,9): if S[i]==t[j]: dp[u[t[j]]][0]+=dp[u[t[j]]-1][0] dp[u[t[j]]][0]%=mod dp[u[t[j]]][1]+=dp[u[t[j]]-1][1] dp[u[t[j]]][1]%=mod break elif S[i]=='?': dp[0][1]+=1 dp[0][1]%=mod for j in range(1,9): dp[u[t[j]]][1]+=dp[u[t[j]]-1][0] dp[u[t[j]]][1]%=mod print((dp[8][0]+dp[8][1])%mod) return main()