#include<iostream>
#include<algorithm>
using namespace std;
char s[60];
void check(int&l,int r,int k,int&ans) {
	for (int i = min(l + k,r); i >= l; i--) {
		if (s[i] == '*') {
			l = i, ans++;
			return;
		}
	}
}
int main() {
	int t;
	cin >> t;
	while (t--) {
		int n, k;
		cin >> n >> k;
		cin >> s;
		int l=n, r=-1;
		for (int i = 0; i < n; i++)
			if (s[i] == '*') {
				l = min(i, l);
				r = max(i, r);
			}
		int ans = 1;
		while (l != r) {
			check(l,r,k, ans);
		}
		cout << ans << endl;
	}
	return 0;
}