You have a stripe of checkered paper of length nn. Each cell is either white or black.
What is the minimum number of cells that must be recolored from white to black in order to have a segment of kk consecutive black cells on the stripe?
If the input data is such that a segment of kk consecutive black cells already exists, then print 0.
The first line contains an integer tt (1≤t≤1041≤t≤104) — the number of test cases.
Next, desc
The first line of the input contains two integers nn and kk (1≤k≤n≤2⋅1051≤k≤n≤2⋅105). The second line consists of the letters 'W' (white) and 'B' (black). The line length is nn.
It is guaranteed that the sum of values nn does not exceed 2⋅1052⋅105.
For each of tt test cases print an integer — the minimum number of cells that need to be repainted from white to black in order to have a segment of kk consecutive black cells.
4
5 3
BBWBW
5 5
BBWBW
5 1
BBWBW
1 1
W
1
2
0
1