#include <bits/stdc++.h>
using namespace std;
void no() { cout << "no\n"; }
void yes() { cout << "yes\n"; }
void solve() {
  int a, b, n;
  string s;
  cin >> a >> b >> s;
  n = s.size();
  vector<int> x;
  for (int i = 0; i < n; ++i) {
    if (s[i] != '.') {
      continue;
    }
    int j = i;
    while (j < n && s[i] == s[j]) {
      ++j;
    }
    if (j - i >= b) {
      x.push_back(j - i);
    }
    i = j - 1;
  }
  if (x.empty()) {
    no();
    return;
  }
  sort(x.begin(), x.end());
  if (x.front() < a) {
    no();
  } else {
    int m = x.size();
    if (x.size() > 1 && x[m - 1] >= 2 * b && x[m - 2] >= 2 * b) {
      no();
      return;
    }
    int xk = x[m - 1];
    if (xk < a + b) {
      if (m % 2) {
        yes();
      } else {
        no();
      }
      return;
    }
    if (xk > 4 * b + a - 2) {
      no();
      return;
    }
    if (m % 2) {
      if (xk - a <= 2 * (b - 1)) {
        yes();
        return;
      }
      int l, r;
      l = (xk - a) / 2;
      r = xk - a - l;
      if (l >= a && r >= a && l < 2 * b && r < 2 * b) {
        yes();
        return;
      }
      no();
    } else {
      for (int y = a; y <= 2 * b - 1; ++y) {
        int l = xk - a - y;
        if (l >= 0 && l < b) {
          yes();
          return;
        }
      }
      no();
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0), cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
