#import sys # input = sys.stdin.readline def mp():return map(int,input().split()) def lmp():return list(map(int,input().split())) def mps(A):return [tuple(map(int, input().split())) for _ in range(A)] import math import bisect import heapq from copy import deepcopy as dc from itertools import accumulate from collections import Counter, defaultdict, deque def ceil(U,V):return (U+V-1)//V def modf1(N,MOD):return (N-1)%MOD+1 inf = int(1e20) mod = int(1e9)+7 n = int(input()) s = input() ss = [] y = "#yukicoder?" for i in s: if i in y: ss.append(y.index(i)) dp = [[0]*2 for i in range(10)] dp[0][0] = 1 l = len(ss) for i in range(l): tar = ss[i] crt = dc(dp) if tar != 10: crt[tar][0] += dp[tar-1][0] crt[tar][1] += dp[tar-1][1] else: for j in range(9): crt[j+1][1] += dp[j][0] for j in range(10): for k in range(2): crt[j][k] %= mod dp = crt #print(dp) print(sum(dp[-1])%mod)