MOD = 10**9 + 7 n = int(input()) s = input().strip() base = 'yukicoder' targets = [base] for i in range(len(base)): temp = list(base) temp[i] = '?' targets.append(''.join(temp)) result = 0 for target in targets: dp = [0] * (len(base) + 1) dp[0] = 1 # Initial state: 1 way to form an empty subsequence for c in s: # Iterate backwards to avoid overwriting the dp values we need to use for j in reversed(range(len(base))): if c == target[j]: dp[j+1] = (dp[j+1] + dp[j]) % MOD result = (result + dp[len(base)]) % MOD print(result)