Mr. Wincenty loves his garden dearly, but he really hates working in it, and above all he hates raking up the leaves that fall every autumn. After several years (and just as many autumns spent raking) Mr. Wincenty decided that enough was enough: his garden is simply too big. So he made up his mind to give part of his land to the neighbors (let them rake the leaves instead).
Mr. Wincenty's garden has an unusual shape. It is a rectangle of size 1×N, divided into N consecutive cells of size 1×1. Each cell holds either grass or a single chestnut tree. Mr. Wincenty wants to keep as large a part of the garden as possible, subject to the following conditions:
What is the maximum length of the garden fragment that Mr. Wincenty can keep?
The first line contains the number of tests L (L≤5). The descriptions of the individual tests follow.
Each test consists of two lines. The first line contains the natural numbers N and K (0<K≤N≤1000000).
The second line describes the garden as a string of length N. Each character of the string is either 'K' or 'T', depending on whether the corresponding cell holds a chestnut tree ('K') or only grass ('T').
For each test, print on its own line the maximum length of the garden fragment that Mr. Wincenty can keep.