#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')
{
if(c=='#')
ct++;
else
ct=0;
if(ct>max)
max=ct;
}
if(max>=B)
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
I2luY2x1ZGUgInN0ZGlvLmgiCiNpbmNsdWRlICJtYXRoLmgiCiNpbmNsdWRlICJzdHJpbmcuaCIKI2RlZmluZSBsbCB1bnNpZ25lZCBpbnQKI2RlZmluZSBnYyBnZXRjaGFyX3VubG9ja2VkCiNkZWZpbmUgcGMgcHV0Y2hhcl91bmxvY2tlZAppbmxpbmUgbGwgcigpCnsKCWxsIHg9MDsKCWNoYXIgYz1nYygpOwoJd2hpbGUoYzw0OHx8Yz41NykKCQljPWdjKCk7Cgl3aGlsZShjPj00OCYmYzw9NTcpCgl7CgkJeD14KjEwK2MtNDg7CgkJYz1nYygpOwoJfQoJcmV0dXJuIHg7Cn0KaW50IG1haW4oKQp7CglsbCBBLEIsaSx0LG1heCxjdDsKCWNoYXIgYzsKCXQ9cigpOwoJd2hpbGUodC0tKQoJewoJCUE9cigpOwlCPXIoKTsKCQljdD1tYXg9MDsKCQl3aGlsZSgoYz1nYygpKSE9J1xuJykKCQl7CgkJCWlmKGM9PScjJykKCQkJCWN0Kys7CgkJCWVsc2UKCQkJCWN0PTA7CgkJCWlmKGN0Pm1heCkKCQkJCW1heD1jdDsKCQl9CgkJaWYobWF4Pj1CKQoJCQlwcmludGYoIk5PXG4iKTsKCQllbHNlCgkJCXByaW50ZigiWUVTXG4iKTsKCX0KcmV0dXJuIDA7Cn0=