#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; vector> st(26); string s; cin >> s; rep(i, n) { st[s[i] - 'a'].insert(i); } while (q--) { int t; cin >> t; if (t == 1) { int i; char c; cin >> i >> c; i--; st[s[i] - 'a'].erase(i); s[i] = c; st[s[i] - 'a'].insert(i); } else { bool ok = true; string t; cin >> t; int cur = -1; for (char c : t) { int d = c - 'a'; auto it = st[d].upper_bound(cur); if (it == st[d].end()) { ok = false; } else { cur = *it; } } cout << (ok ? "Yes" : "No") << endl; } } return 0; }