K-th String

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

Alice has n26n \le 26 cards, and each card is labeled with one of the first nn lowercase English letters. For example, if n=3n = 3, Alice has three cards that are labeled "a'', "b'', and "c''. Alice constructed a string tt by permuting these cards. Furthermore, she considered all non-empty substrings of tt and sorted them lexicographically. It turned out that the kk-th string in this sorted list of substrings was ss. How many tt's are possible?

For example, if n=3n = 3 and t=cabt = `cab`, the sorted list is a, ab, b, c, ca, cab, and the third string in the sorted list is b. When k=3k = 3 and s=bs = `b`, there are two possibilites for tt: cab and bac.

Compute the number of possible tt's that are consistent with the given information, modulo 109+710^9 + 7. Note that Alice may have made mistakes, in which case the number of possible tt's is zero.

입력

On the first line, you are given two space-separated integers nn and kk. On the next line, you are given the string ss (1n261 \le n \le 26, 1kn(n+1)/21 \le k \le n (n + 1) / 2). The characters in ss are pairwise distinct; ss consists of the first nn lowercase English letters.

출력

Print the answer on a single line.