#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
char s[maxn];
int a[maxn];
int n, m;
bool check1(int x) {
  if (x <= n + 2 * (m - 1)) return true;
  if (4 * m - 2 + n >= x && x >= 3 * n) return true;
  return false;
}
bool check2(int x) {
  if (2 * m - 1 + m - 1 + n >= x && 2 * n <= x) return true;
  return false;
}
int main() {
  int kase;
  cin >> kase;
  while (kase--) {
    cin >> n >> m;
    cin >> s;
    int ls = strlen(s);
    int cnt = 0;
    for (int i = 0; i < ls; i++) {
      int num = 0;
      while (s[i] == '.') {
        num++;
        i++;
      }
      if (num >= m) {
        a[cnt++] = num;
      }
      if (num != 0) i--;
    }
    int f = 0;
    int num = 0;
    int tmp = 0;
    for (int i = 0; i < cnt; i++) {
      if (a[i] >= m && a[i] < n) {
        f = 1;
        break;
      }
      if (a[i] >= 2 * m) {
        num++;
        tmp = a[i];
      }
      if (num >= 2) {
        f = 1;
        break;
      }
    }
    if (f) {
      puts("NO");
      continue;
    }
    if (cnt % 2 == 1 && num == 1) {
      if (check1(tmp))
        puts("YES");
      else
        puts("NO");
    } else if (cnt % 2 == 1 && num == 0) {
      puts("YES");
    } else if (cnt % 2 == 0 && num == 1) {
      if (check2(tmp))
        puts("YES");
      else
        puts("NO");
    } else if (cnt % 2 == 0 && num == 0) {
      puts("NO");
    }
  }
  return 0;
}
