#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<unsigned long long> t;
vector<unsigned long long> codes;
const unsigned long long prime = 61;
vector<unsigned long long> pows;
void build (int v, int tl, int tr) {
if (tl == tr){
t[v] = codes[tl] * pows[tl - 1];
}
else {
int tm = (tl + tr) / 2;
build (2 * v, tl, tm);
build (2 * v + 1, tm + 1, tr);
t[v] = t[2 * v] + t[2 * v + 1];
}
}
unsigned long long sum (int v, int tl, int tr, int l, int r) {
if (l > r){
//cout << "here";
return 0;
}
if (l == tl && r == tr)
return t[v];
int tm = (tl + tr) / 2;
return sum (2 * v, tl, tm, l, min(r, tm))
+ sum (2 * v + 1, tm + 1, tr, max(l, tm + 1), r);
}
void update (int v, int tl, int tr, int pos, unsigned long long newVal) {
if (tl == tr)
t[v] = newVal * pows[pos - 1];
else {
int tm = (tl + tr) / 2;
if (pos <= tm)
update (v*2, tl, tm, pos, newVal);
else
update (2 * v + 1, tm + 1, tr, pos, newVal);
t[v] = t[2 * v] + t[2 * v + 1];
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, k;
cin >> n >> k;
t.resize(4 * n);
string a;
cin >> a;
codes.resize(n + 1);
for(int i = 1; i <= n; i++){
codes[i] = a[i - 1] - 'A' + 1;
}
pows.resize(n + 1);
pows[0] = 1;
for(int i = 1; i <= n; i++){
pows[i] = pows[i - 1] * prime;
}
build(1, 1, n);
cin.ignore();
for(int t = 0; t < k; t++){
char q;
cin >> q;
if(q == '?'){
int i, j, len;
cin >> i >> j >>len;
if(i > j){
swap(i, j);
}
if(sum(1, 1, n, i, i + len - 1) * pows[j - i] == sum(1, 1, n, j, j + len - 1)){
cout << "+";
}
else{
cout << "-";
}
}
else if(q == '*'){
int temp;
char c;
cin >> temp >> c;
update(1, 1, n, temp, c - 'A' + 1);
}
cin.ignore();
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdmVjdG9yPHVuc2lnbmVkIGxvbmcgbG9uZz4gdDsKdmVjdG9yPHVuc2lnbmVkIGxvbmcgbG9uZz4gY29kZXM7CmNvbnN0IHVuc2lnbmVkIGxvbmcgbG9uZyBwcmltZSA9IDYxOwp2ZWN0b3I8dW5zaWduZWQgIGxvbmcgbG9uZz4gcG93czsKCnZvaWQgYnVpbGQgKGludCB2LCBpbnQgdGwsIGludCB0cikgewogICAgaWYgKHRsID09IHRyKXsKICAgICAgICB0W3ZdID0gY29kZXNbdGxdICogcG93c1t0bCAtIDFdOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgaW50IHRtID0gKHRsICsgdHIpIC8gMjsKICAgICAgICBidWlsZCAoMiAqIHYsIHRsLCB0bSk7CiAgICAgICAgYnVpbGQgKDIgKiB2ICsgMSwgdG0gKyAxLCB0cik7CiAgICAgICAgdFt2XSA9IHRbMiAqIHZdICsgdFsyICogdiArIDFdOwogICAgfQp9Cgp1bnNpZ25lZCBsb25nIGxvbmcgc3VtIChpbnQgdiwgaW50IHRsLCBpbnQgdHIsIGludCBsLCBpbnQgcikgewogICAgaWYgKGwgPiByKXsKICAgICAgICAvL2NvdXQgPDwgImhlcmUiOwogICAgICAgIHJldHVybiAwOwogICAgfQogICAgaWYgKGwgPT0gdGwgJiYgciA9PSB0cikKICAgICAgICByZXR1cm4gdFt2XTsKICAgIGludCB0bSA9ICh0bCArIHRyKSAvIDI7CiAgICByZXR1cm4gc3VtICgyICogdiwgdGwsIHRtLCBsLCBtaW4ociwgdG0pKQogICAgICAgICAgICsgc3VtICgyICogdiArIDEsIHRtICsgMSwgdHIsIG1heChsLCB0bSArIDEpLCByKTsKfQoKdm9pZCB1cGRhdGUgKGludCB2LCBpbnQgdGwsIGludCB0ciwgaW50IHBvcywgdW5zaWduZWQgbG9uZyBsb25nIG5ld1ZhbCkgewogICAgaWYgKHRsID09IHRyKQogICAgICAgIHRbdl0gPSBuZXdWYWwgKiBwb3dzW3BvcyAtIDFdOwogICAgZWxzZSB7CiAgICAgICAgaW50IHRtID0gKHRsICsgdHIpIC8gMjsKICAgICAgICBpZiAocG9zIDw9IHRtKQogICAgICAgICAgICB1cGRhdGUgKHYqMiwgdGwsIHRtLCBwb3MsIG5ld1ZhbCk7CiAgICAgICAgZWxzZQogICAgICAgICAgICB1cGRhdGUgKDIgKiB2ICsgMSwgdG0gKyAxLCB0ciwgcG9zLCBuZXdWYWwpOwogICAgICAgIHRbdl0gPSB0WzIgKiB2XSArIHRbMiAqIHYgKyAxXTsKICAgIH0KfQoKaW50IG1haW4oKSB7CiAgICBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsKICAgIGNpbi50aWUoTlVMTCk7CiAgICBpbnQgbiwgazsKICAgIGNpbiA+PiBuID4+IGs7CiAgICB0LnJlc2l6ZSg0ICogbik7CiAgICBzdHJpbmcgYTsKICAgIGNpbiA+PiBhOwogICAgY29kZXMucmVzaXplKG4gKyAxKTsKICAgIGZvcihpbnQgaSA9IDE7IGkgPD0gbjsgaSsrKXsKICAgICAgICBjb2Rlc1tpXSA9IGFbaSAtIDFdIC0gJ0EnICsgMTsKICAgIH0KICAgIHBvd3MucmVzaXplKG4gKyAxKTsKICAgIHBvd3NbMF0gPSAxOwogICAgZm9yKGludCBpID0gMTsgaSA8PSBuOyBpKyspewogICAgICAgIHBvd3NbaV0gPSBwb3dzW2kgLSAxXSAqIHByaW1lOwogICAgfQogICAgYnVpbGQoMSwgMSwgbik7CiAgICBjaW4uaWdub3JlKCk7CiAgICBmb3IoaW50IHQgPSAwOyB0IDwgazsgdCsrKXsKICAgICAgICBjaGFyIHE7CiAgICAgICAgY2luID4+IHE7CiAgICAgICAgaWYocSA9PSAnPycpewogICAgICAgICAgICBpbnQgaSwgaiwgbGVuOwogICAgICAgICAgICBjaW4gPj4gaSA+PiBqID4+bGVuOwogICAgICAgICAgICBpZihpID4gail7CiAgICAgICAgICAgICAgICBzd2FwKGksIGopOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmKHN1bSgxLCAxLCBuLCBpLCBpICsgbGVuIC0gMSkgKiBwb3dzW2ogLSBpXSA9PSBzdW0oMSwgMSwgbiwgaiwgaiArIGxlbiAtIDEpKXsKICAgICAgICAgICAgICAgIGNvdXQgPDwgIisiOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2V7CiAgICAgICAgICAgICAgICBjb3V0IDw8ICItIjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIGlmKHEgPT0gJyonKXsKICAgICAgICAgICAgaW50IHRlbXA7CiAgICAgICAgICAgIGNoYXIgYzsKICAgICAgICAgICAgY2luID4+IHRlbXAgPj4gYzsKICAgICAgICAgICAgdXBkYXRlKDEsIDEsIG4sIHRlbXAsIGMgLSAnQScgKyAxKTsKICAgICAgICB9CiAgICAgICAgY2luLmlnbm9yZSgpOwogICAgfQogICAgcmV0dXJuIDA7Cn0=