#include #include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int n, q; cin >> n >> q; string s; cin >> s; while (q--) { int t; cin >> t; if (t == 1) { int i; char c; cin >> i >> c; i--; s[i] = c; } else { string t; cin >> t; int m = t.size(); auto v = atcoder::z_algorithm(t + s); bool ok = false; rep(i, n) { if (v[i + m] >= m) ok = true; } cout << (ok ? "Yes" : "No") << endl; } } return 0; }