#include "stdio.h"
#include "math.h"
#include "string.h"
#define ll unsigned int
#define gc getchar_unlocked
#define pc putchar_unlocked
inline ll r()
{
ll x=0;
char c=gc();
while(c<48||c>57)
c=gc();
while(c>=48&&c<=57)
{
x=x*10+c-48;
c=gc();
}
return x;
}
int main()
{
ll A,B,i,t,max,ct;
char c;
t=r();
while(t--)
{
A=r(); B=r();
ct=max=0;
while((c=gc())!='\n'&&c!=EOF)
{
if(c=='#')
ct++;
else
ct=0;
if(ct>max)
max=ct;
}
if(max>=B)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
I2luY2x1ZGUgInN0ZGlvLmgiCiNpbmNsdWRlICJtYXRoLmgiCiNpbmNsdWRlICJzdHJpbmcuaCIKI2RlZmluZSBsbCB1bnNpZ25lZCBpbnQKI2RlZmluZSBnYyBnZXRjaGFyX3VubG9ja2VkCiNkZWZpbmUgcGMgcHV0Y2hhcl91bmxvY2tlZAppbmxpbmUgbGwgcigpCnsKCWxsIHg9MDsKCWNoYXIgYz1nYygpOwoJd2hpbGUoYzw0OHx8Yz41NykKCQljPWdjKCk7Cgl3aGlsZShjPj00OCYmYzw9NTcpCgl7CgkJeD14KjEwK2MtNDg7CgkJYz1nYygpOwoJfQoJcmV0dXJuIHg7Cn0KaW50IG1haW4oKQp7CglsbCBBLEIsaSx0LG1heCxjdDsKCWNoYXIgYzsKCXQ9cigpOwoJd2hpbGUodC0tKQoJewoJCUE9cigpOwlCPXIoKTsKCQljdD1tYXg9MDsKCQl3aGlsZSgoYz1nYygpKSE9J1xuJyYmYyE9RU9GKQoJCXsKCQkJaWYoYz09JyMnKQoJCQkJY3QrKzsKCQkJZWxzZQoJCQkJY3Q9MDsKCQkJaWYoY3Q+bWF4KQoJCQkJbWF4PWN0OwoJCX0KCQlpZihtYXg+PUIpCgkJCXByaW50ZigiTk9cbiIpOwoJCWVsc2UKCQkJcHJpbnRmKCJZRVNcbiIpOwoJfQpyZXR1cm4gMDsKfQ==