204_D. Little Elephant and Retro Strings
The Little Elephant has found a ragged old black-and-white string s on the attic.

The characters of string s are numbered from the left to the right from 1 to |s|, where |s| is the length of the string. Let's denote the i-th character of string s as si. As the string is black-and-white, each character of the string is either letter "B", or letter "W". Unfortunately, the string is very old and some characters are damaged. The damaged positions are denoted as "X".

The Little Elephant in determined to restore the string and hang it on the wall. For that he needs to replace each character "X" by a "B" or a "W". The string must look good on the wall, so it must be beautiful. The Little Elephant considers a string beautiful if it has two non-intersecting substrings of a given length k, such that the left one fully consists of characters "B", and the right one fully consists of characters "W". More formally, there are four integers a, b, c, d (1 ≤ a ≤ b < c ≤ d ≤ |s|; b - a + 1 = d - c + 1 = k) such that si = "B" (a ≤ i ≤ b) and sj = "W" (c ≤ j ≤ d). 

Help the Little Elephant find the number of different beautiful strings he can obtain from string s. Two strings are considered different if there is such position, where the character in the first string differs from the corresponding character in the second string. If this string doesn't contain characters «X» and it is already beautiful — the answer is 1.

As the answer can be rather large, print it modulo 1000000007 (109 + 7).

Input

The first line contains two space-separated integers n and k (1 ≤ k ≤ n ≤ 106). The second line contains string s. String s has length n and only consists of characters "W", "B" and "X".

Output

On a single line print an integer — the answer to the problem modulo 1000000007 (109 + 7).

Examples

Input

3 2
XXX


Output

0


Input

4 2
XXXX


Output

1


Input

10 2
XXBXXWXXXX


Output

166
```python
Mod=1000000007
n,k=map(int,input().split(' '))
s=' '+input()
f,fs,g,gs,w=[0]*1000005,[0]*1000005,[0]*1000005,[0]*1000005,[0]*1000005
qx,qw,qb=[0]*1000005,[0]*1000005,[0]*1000005
q=0
f[0]=fs[0]=1
for i in range(1,n+1):
	lg=(i-k if i-k>=q else q)
	if s[i]!='B':
		f[i]=fs[i-1]-fs[lg-1]+Mod
		f[i]-=(Mod if f[i]>=Mod else 0)
	else:
		f[i]=0
	fs[i]=fs[i-1]+f[i]
	fs[i]-=(Mod if fs[i]>=Mod else 0)
	if s[i]=='W':
		q=i;
g[n+1]=gs[n+1]=1
q=n+1
for i in range(n,0,-1):
	rg=(i+k if i+k<=q else q)
	if s[i]!='W':
		g[i]=gs[i+1]-gs[rg+1]+Mod
		g[i]-=(Mod if g[i]>=Mod else 0)
	else:
		g[i]=0
	gs[i]=gs[i+1]+g[i]
	gs[i]-=(Mod if gs[i]>=Mod else 0)
	if s[i]=='B':
		q=i;
for i in range(1,n+1):
	qx[i],qb[i],qw[i]=qx[i-1]+(s[i]=='X'),qb[i-1]+(s[i]=='B'),qw[i-1]+(s[i]=='W')
for i in range(n,0,-1):
	w[i]=w[i+1]
	if s[i]=='X':
		w[i]*=2
		w[i]-=(Mod if w[i]>=Mod else 0)
	if i+k-1<=n:
		if qb[i+k-1]-qb[i-1]==0:
			w[i]+=g[i+k]
			w[i]-=(Mod if w[i]>=Mod else 0)
ans=0
for i in range(k,n+1):
	if qw[i]-qw[i-k]==0:
		ans=(ans+f[i-k]*w[i+1])%Mod
print(ans)
```