func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long inf = (long long)1e18;   const long long mod = (long long)1e9 + 7;   const double eps = (double)1e-9;   const double pi = acos(-1.0);   const int dx[] = {0, 0, 1, 0, -1};   const int dy[] = {0, 1, 0, -1, 0};   const int N = 100500;   void solve() {     int a, b, cnt = 0;     string second;     cin >> a >> b >> second;     vector<int> v;     cnt = 0;     for (int i = 0; i < (int)second.size(); ++i) {       if (second[i] ==  X ) continue;       int j = i;       while (j + 1 < (int)second.size() && second[j + 1] == second[j]) j++;       int len = j - i + 1;       if (len < b) continue;       if (b <= len && len < a) {         cout <<  NO  << endl;         return;       }       if (a <= len && len < 2 * b)         cnt++;       else         v.push_back(len);       i = j;     }     if (v.size() == 0) {       if (cnt % 2 == 0)         cout <<  NO  << endl;       else         cout <<  YES  << endl;       return;     }     if (v.size() > 1) {       cout <<  NO  << endl;       return;     }     int x = v[0];     for (int i = 0; i + a <= x; ++i) {       if ((b <= i && i < a) || (b <= x - a - i && x - a - i < a)) continue;       if (2 * b <= max(i, x - a - i)) continue;       int ncnt = cnt;       if (a <= i && i < 2 * b) ncnt++;       if (a <= x - a - i && x - a - i < 2 * b) ncnt++;       if (ncnt % 2 == 0) {         cout <<  YES  << endl;         return;       }     }     cout <<  NO  << endl;   }   int main() {     cin.tie(NULL);     cout.tie(NULL);     ios_base::sync_with_stdio(false);     int T;     cin >> T;     while (T--) solve();     return 0;   }   