function b(x,y) return (x+y) % 1000000007 end q={121,117,107,105,99,111,100,101,114} r=0 function f(n,s,A) c=q[A] q[A]=63 t={} for i=1,9 do t[i]=0 end for i=1,n do for j=1,9 do if s:byte(i)==q[j] then v=j==1 and 1 or t[j-1] t[j]=b(t[j],v) end end end r=b(r,t[9]) q[A]=c end n=io.read("*n","*l") s=io.read() for i=0,9 do f(n,s,i) end print(r)