#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int tc;
  cin >> tc;
  while (tc--) {
    int a, b;
    cin >> a >> b;
    string s;
    cin >> s;
    s += 'X';
    int bob = 0;
    vector<int> val;
    for (int i = 0, cnt = 0; i < (int)s.size(); ++i) {
      if (s[i] == '.') {
        ++cnt;
      } else {
        if (cnt >= b && cnt < a)
          bob = 1;
        else if (cnt >= a)
          val.push_back(cnt);
        cnt = 0;
      }
    }
    sort(val.begin(), val.end(), greater<int>());
    if ((int)val.size() > 1 && val[1] >= 2 * b)
      bob = 1;
    else {
      bool bwin = 1;
      if (val.size() & 1) {
        for (int i = 0; i <= val[0] - a; ++i) {
          int l = i, r = val[0] - a - i;
          if (l >= a && l < 2 * b && r >= a && r < 2 * b) bwin = 0;
          if (l < b && r < b) bwin = 0;
        }
      } else if (val.size()) {
        for (int i = 0; i <= val[0] - a; ++i) {
          int l = i, r = val[0] - a - i;
          if (l >= a && l < 2 * b && r < b) bwin = 0;
        }
      }
      bob |= bwin;
    }
    if (bob)
      cout << "no\n";
    else
      cout << "yes\n";
  }
}
