#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
char s[maxn];
int T, n, x, y, a[maxn];
vector<int> v;
int main() {
  for (cin >> T; T--;) {
    cin >> x >> y;
    cin >> (s + 1);
    n = strlen(s + 1);
    for (int i = 1; i <= n; i++) a[i] = s[i] == '.' ? 1 : 0;
    int cnt = 0, ok = 0;
    v.clear();
    for (int i = 1; i <= n; i++) {
      if (a[i])
        ++cnt;
      else if (cnt)
        v.push_back(cnt), cnt = 0;
    }
    if (cnt) v.push_back(cnt), cnt = 0;
    for (auto &val : v) {
      if (val < x && val >= y) ok = 1;
      if (val >= 2 * y) ++cnt;
    }
    if (ok || cnt >= 2) {
      cout << "No"
           << "\n";
      continue;
    }
    if (cnt == 0) {
      for (auto &val : v)
        if (val >= x) ++cnt;
      if (cnt & 1) {
        cout << "Yes"
             << "\n";
        continue;
      } else {
        cout << "No"
             << "\n";
        continue;
      }
    }
    if (cnt == 1) {
      int max_len = *max_element(v.begin(), v.end());
      int flag = 0;
      cnt = 0;
      for (auto &val : v)
        if (val != max_len && val >= x) ++cnt;
      for (int l = 1; l + x - 1 <= max_len; l++) {
        int r = l + x - 1;
        int left = l - 1, right = max_len - r;
        if (left >= 2 * y || right >= 2 * y) continue;
        if ((left >= y && left < x) || (right >= y && right < x)) continue;
        int tmp = cnt + (left >= x) + (right >= x);
        if (tmp % 2 == 0) {
          flag = 1;
          cout << "Yes"
               << "\n";
          break;
        }
      }
      if (!flag) {
        cout << "No"
             << "\n";
        continue;
      }
    }
  }
  return 0;
}
