#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
const int maxn = 4e5 + 50;
char ch[maxn];
vector<int> use;
bool solve(int a, int b) {
  if (use.empty()) return false;
  for (int u : use)
    if (u >= b and u < a) return false;
  sort(use.begin(), use.end());
  if (*use.rbegin() >= 2 * b) {
    int f = *use.rbegin();
    use.pop_back();
    for (int u : use)
      if (u >= 2 * b) return false;
    int sz = use.size(), le = f - a;
    for (int i = 0; i <= le; ++i) {
      int u = i, v = le - i;
      if ((u < b or (u >= a and u < 2 * b)) and
          (v < b or (v >= a and v < 2 * b))) {
        int tmp = sz + 1;
        if (u >= a and u < 2 * b) ++tmp;
        if (v >= a and v < 2 * b) ++tmp;
        if (tmp & 1) return true;
      }
    }
    return false;
  } else {
    int sz = use.size();
    if (sz & 1) return true;
    return false;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  while (q--) {
    int a, b;
    cin >> a >> b;
    cin >> ch + 1;
    int n = strlen(ch + 1);
    use.clear();
    for (int i = 1; i <= n; ++i)
      if (ch[i] == '.') {
        int j = i;
        while (j <= n and ch[j] == '.') ++j;
        if (j - i >= b) use.push_back(j - i);
        i = j - 1;
      }
    cout << (solve(a, b) ? "YES\n" : "NO\n");
  }
  return 0;
}
