#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define f(i, a, n) for (int i = (a); i <= (n); i++)
#define ff first
#define ss second
#define UWU ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x)
{
cerr << '{';
__print(x.first);
cerr << ',';
__print(x.second);
cerr << '}';
}
template <typename T>
void __print(const T &x)
{
int f = 0;
cerr << '{';
for (auto &i : x)
cerr << (f++ ? "," : ""), __print(i);
cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v)
{
__print(t);
if (sizeof...(v))
cerr << ", ";
_print(v...);
}
#ifndef ONLINE_JUDGE
#define debug(x...) \
cerr << "[" << #x << "] = ["; \
_print(x)
#else
#define debug(x...)
#endif
const ll N = 1e5 + 5, mod = 998244353, p1 = 31, mod2 = 1e9 + 9, p2 = 37, M = 9e6 + 5;
void solve()
{
ll n, q;
cin >> n >> q;
vector<ll> a(n);
char c;
ll len = sqrt(n) + 1;
vector<vector<ll>> b(len);
for (ll i = 0; i < n; i++)
{
cin >> c;
a[i] = c - 'a';
b[i / len].push_back(a[i]);
}
vector<ll> lazy(len, 0), valid(len, 0);
auto updateLazy = [&](ll i)
{
for (ll j = 0; j < b[i].size(); j++)
{
b[i][j] += lazy[i];
b[i][j] %= 26;
}
lazy[i] = 0;
};
auto updateValidity = [&](ll i)
{
updateLazy(i);
if (b[i].size() < 2)
return;
bool f = 0;
for (ll j = 1; j < b[i].size(); j++)
{
if (b[i][j] == b[i][j - 1])
f = 1;
if (j > 1)
if (b[i][j] == b[i][j - 2])
f = 1;
}
valid[i] = f;
};
auto updatePos = [&](ll i, ll block, ll x)
{
b[block][i] += x;
b[block][i] %= 26;
};
auto check = [&](ll b1, ll b2)
{
ll p1 = b1 / len;
ll p2 = b2 / len;
ll n1 = (b[p1][b1 % len] + lazy[p1]) % 26;
ll n2 = (b[p2][b2 % len] + lazy[p2]) % 26;
return (n1 == n2);
};
for (ll i = 0; i < len; i++)
updateValidity(i);
ll op, l, r, x;
while (q--)
{
cin >> op >> l >> r;
l--, r--;
if (op == 1)
{
cin >> x;
for (ll i = l; i <= r;)
{
ll block = i / len;
if ((i % len == 0) && (i + len - 1 <= r))
{
lazy[block] += x;
i += len;
}
else
{
updatePos(i % len, i / len, x);
i++;
}
}
updateValidity(l / len);
updateValidity(r / len);
}
else
{
bool t = 0;
for (ll i = l; i <= r;)
{
ll block = i / len;
if ((i % len == 0) && (i + len - 1 <= r))
{
if (valid[block])
t |= 1;
i += len;
}
else
{
i++;
}
}
for (ll i = l; i <= r;)
{
ll block = i / len;
if ((i % len == 0) && (i + len - 1 <= r))
{
if (i + 1 <= r)
t |= check(i, i + 1);
if (i + 2 <= r)
t |= check(i, i + 2);
if (i - 1 >= l)
t |= check(i, i - 1);
if (i - 2 >= l)
t |= check(i, i - 2);
i += len;
}
else
{
if (i + 1 <= r)
t |= check(i, i + 1);
if (i + 2 <= r)
t |= check(i, i + 2);
if (i - 1 >= l)
t |= check(i, i - 1);
if (i - 2 >= l)
t |= check(i, i - 2);
i++;
}
}
if (t)
cout
<< "NO\n";
else
cout << "YES\n";
}
}
}
int main()
{
UWU;
int tc = 1;
cin >> tc;
cout << fixed << setprecision(30);
while (tc--)
{
solve();
}
}
/*
*/
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSB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BxOwogICAgY2luID4+IG4gPj4gcTsKICAgIHZlY3RvcjxsbD4gYShuKTsKICAgIGNoYXIgYzsKICAgIGxsIGxlbiA9IHNxcnQobikgKyAxOwogICAgdmVjdG9yPHZlY3RvcjxsbD4+IGIobGVuKTsKICAgIGZvciAobGwgaSA9IDA7IGkgPCBuOyBpKyspCiAgICB7CiAgICAgICAgY2luID4+IGM7CiAgICAgICAgYVtpXSA9IGMgLSAnYSc7CiAgICAgICAgYltpIC8gbGVuXS5wdXNoX2JhY2soYVtpXSk7CiAgICB9CiAgICB2ZWN0b3I8bGw+IGxhenkobGVuLCAwKSwgdmFsaWQobGVuLCAwKTsKICAgIGF1dG8gdXBkYXRlTGF6eSA9IFsmXShsbCBpKQogICAgewogICAgICAgIGZvciAobGwgaiA9IDA7IGogPCBiW2ldLnNpemUoKTsgaisrKQogICAgICAgIHsKICAgICAgICAgICAgYltpXVtqXSArPSBsYXp5W2ldOwogICAgICAgICAgICBiW2ldW2pdICU9IDI2OwogICAgICAgIH0KICAgICAgICBsYXp5W2ldID0gMDsKICAgIH07CiAgICBhdXRvIHVwZGF0ZVZhbGlkaXR5ID0gWyZdKGxsIGkpCiAgICB7CiAgICAgICAgdXBkYXRlTGF6eShpKTsKICAgICAgICBpZiAoYltpXS5zaXplKCkgPCAyKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgYm9vbCBmID0gMDsKICAgICAgICBmb3IgKGxsIGogPSAxOyBqIDwgYltpXS5zaXplKCk7IGorKykKICAgICAgICB7CiAgICAgICAgICAgIGlmIChiW2ldW2pdID09IGJbaV1baiAtIDFdKQogICAgICAgICAgICAgICAgZiA9IDE7CiAgICAgICAgICAgIGlmIChqID4gMSkKICAgICAgICAgICAgICAgIGlmIChiW2ldW2pdID09IGJbaV1baiAtIDJdKQogICAgICAgICAgICAgICAgICAgIGYgPSAxOwogICAgICAgIH0KICAgICAgICB2YWxpZFtpXSA9IGY7CiAgICB9OwoKICAgIGF1dG8gdXBkYXRlUG9zID0gWyZdKGxsIGksIGxsIGJsb2NrLCBsbCB4KQogICAgewogICAgICAgIGJbYmxvY2tdW2ldICs9IHg7CiAgICAgICAgYltibG9ja11baV0gJT0gMjY7CiAgICB9OwogICAgYXV0byBjaGVjayA9IFsmXShsbCBiMSwgbGwgYjIpCiAgICB7CiAgICAgICAgbGwgcDEgPSBiMSAvIGxlbjsKICAgICAgICBsbCBwMiA9IGIyIC8gbGVuOwogICAgICAgIGxsIG4xID0gKGJbcDFdW2IxICUgbGVuXSArIGxhenlbcDFdKSAlIDI2OwogICAgICAgIGxsIG4yID0gKGJbcDJdW2IyICUgbGVuXSArIGxhenlbcDJdKSAlIDI2OwogICAgICAgIHJldHVybiAobjEgPT0gbjIpOwogICAgfTsKICAgIGZvciAobGwgaSA9IDA7IGkgPCBsZW47IGkrKykKICAgICAgICB1cGRhdGVWYWxpZGl0eShpKTsKICAgIGxsIG9wLCBsLCByLCB4OwoKICAgIHdoaWxlIChxLS0pCiAgICB7CiAgICAgICAgY2luID4+IG9wID4+IGwgPj4gcjsKICAgICAgICBsLS0sIHItLTsKICAgICAgICBpZiAob3AgPT0gMSkKICAgICAgICB7CiAgICAgICAgICAgIGNpbiA+PiB4OwogICAgICAgICAgICBmb3IgKGxsIGkgPSBsOyBpIDw9IHI7KQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBsbCBibG9jayA9IGkgLyBsZW47CiAgICAgICAgICAgICAgICBpZiAoKGkgJSBsZW4gPT0gMCkgJiYgKGkgKyBsZW4gLSAxIDw9IHIpKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGxhenlbYmxvY2tdICs9IHg7CiAgICAgICAgICAgICAgICAgICAgaSArPSBsZW47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgdXBkYXRlUG9zKGkgJSBsZW4sIGkgLyBsZW4sIHgpOwogICAgICAgICAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICB1cGRhdGVWYWxpZGl0eShsIC8gbGVuKTsKICAgICAgICAgICAgdXBkYXRlVmFsaWRpdHkociAvIGxlbik7CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIGJvb2wgdCA9IDA7CiAgICAgICAgICAgIGZvciAobGwgaSA9IGw7IGkgPD0gcjspCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGxsIGJsb2NrID0gaSAvIGxlbjsKICAgICAgICAgICAgICAgIGlmICgoaSAlIGxlbiA9PSAwKSAmJiAoaSArIGxlbiAtIDEgPD0gcikpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbGlkW2Jsb2NrXSkKICAgICAgICAgICAgICAgICAgICAgICAgdCB8PSAxOwogICAgICAgICAgICAgICAgICAgIGkgKz0gbGVuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGkrKzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBmb3IgKGxsIGkgPSBsOyBpIDw9IHI7KQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBsbCBibG9jayA9IGkgLyBsZW47CiAgICAgICAgICAgICAgICBpZiAoKGkgJSBsZW4gPT0gMCkgJiYgKGkgKyBsZW4gLSAxIDw9IHIpKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGlmIChpICsgMSA8PSByKQogICAgICAgICAgICAgICAgICAgICAgICB0IHw9IGNoZWNrKGksIGkgKyAxKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaSArIDIgPD0gcikKICAgICAgICAgICAgICAgICAgICAgICAgdCB8PSBjaGVjayhpLCBpICsgMik7CiAgICAgICAgICAgICAgICAgICAgaWYgKGkgLSAxID49IGwpCiAgICAgICAgICAgICAgICAgICAgICAgIHQgfD0gY2hlY2soaSwgaSAtIDEpOwogICAgICAgICAgICAgICAgICAgIGlmIChpIC0gMiA+PSBsKQogICAgICAgICAgICAgICAgICAgICAgICB0IHw9IGNoZWNrKGksIGkgLSAyKTsKICAgICAgICAgICAgICAgICAgICBpICs9IGxlbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBpZiAoaSArIDEgPD0gcikKICAgICAgICAgICAgICAgICAgICAgICAgdCB8PSBjaGVjayhpLCBpICsgMSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKGkgKyAyIDw9IHIpCiAgICAgICAgICAgICAgICAgICAgICAgIHQgfD0gY2hlY2soaSwgaSArIDIpOwogICAgICAgICAgICAgICAgICAgIGlmIChpIC0gMSA+PSBsKQogICAgICAgICAgICAgICAgICAgICAgICB0IHw9IGNoZWNrKGksIGkgLSAxKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaSAtIDIgPj0gbCkKICAgICAgICAgICAgICAgICAgICAgICAgdCB8PSBjaGVjayhpLCBpIC0gMik7CiAgICAgICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0KQogICAgICAgICAgICAgICAgY291dAogICAgICAgICAgICAgICAgICAgIDw8ICJOT1xuIjsKICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgY291dCA8PCAiWUVTXG4iOwogICAgICAgIH0KICAgIH0KfQppbnQgbWFpbigpCnsKICAgIFVXVTsKICAgIGludCB0YyA9IDE7CiAgICBjaW4gPj4gdGM7CiAgICBjb3V0IDw8IGZpeGVkIDw8IHNldHByZWNpc2lvbigzMCk7CiAgICB3aGlsZSAodGMtLSkKICAgIHsKCiAgICAgICAgc29sdmUoKTsKICAgIH0KfQovKgoKKi8=