#include <bits/stdc++.h>
using namespace std;
int a, b, dem, cnt, num, state;
bool kt;
void mo() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void nhap() {
  cin >> a >> b;
  string st;
  cin >> st;
  st = st + 'X';
  kt = true;
  dem = 0;
  cnt = 0;
  num = 0;
  state = 0;
  for (int i = 0; i < st.length(); i++) {
    if (st[i] == '.')
      dem++;
    else {
      if (dem >= b && dem < a) {
        kt = false;
      } else if (dem >= a && dem < 2 * b) {
        cnt++;
      } else if (dem >= 2 * b) {
        num++;
        state = dem;
      }
      dem = 0;
    }
  }
}
void xuli() {
  if (num >= 2) kt = false;
  if (!kt) {
    cout << "no";
    cout << "\n";
    return;
  }
  if (num == 0) {
    if (cnt % 2 == 1)
      kt = true;
    else
      kt = false;
  } else if (num == 1) {
    kt = false;
    for (int i = 1; i <= state - a + 1; i++) {
      int t1 = i - 1;
      int t2 = (state - (i + a - 1));
      int tmp = 0;
      if ((t1 >= b && t1 < a) || (t2 >= b && t2 < a)) continue;
      if ((t1 >= 2 * b) || (t2 >= 2 * b)) continue;
      if (t1 >= a && t1 < 2 * b) tmp++;
      if (t2 >= a && t2 < 2 * b) tmp++;
      if ((cnt + tmp) % 2 == 0) kt = true;
    }
  }
  if (kt)
    cout << "yes";
  else
    cout << "no";
  cout << "\n";
}
int main() {
  mo();
  int T;
  cin >> T;
  while (T--) {
    nhap();
    xuli();
  }
}
