#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #define mod 1000000007 void p(unsigned int* x,const unsigned int y){ *x+=y; if(*x>=mod)*x-=mod; } unsigned int dp[2][10]; char* t="yukicoder"; char x,s[8]; int main(){ gets(s,8); dp[0][0]=1; while(~(x=getchar())){ if(x=='?'){ for(unsigned int j=0;j<9;++j){ p(&dp[1][j+1],dp[0][j]); } }else{ for(unsigned int j=0;j<9;++j){ if(x==t[j]){ p(&dp[0][j+1],dp[0][j]); p(&dp[1][j+1],dp[1][j]); } } } } p(&dp[0][9],dp[1][9]); printf("%u\n",dp[0][9]); }