#include using namespace std; void submain(int a, int q, string S) { while (q--) { int n; cin >> n; if (n==1) { int x; char y; cin >> x >> y; S[x] = y; } else { char y; cin >> y; if (S[0] == y) cout << "Yes" << endl; else cout << "No" << endl; } } return; } int main() { int a, q; cin >> a >> q; string S; cin >> S; if (a == 1) { submain(a, q, S); return 0; } set s; for (int i = 1; i <= min(a, 1000); i++) { //i文字のものをセットに追加 for (int k = 0; k <= a-i; k++) { string x; for (int m = k; m < k+i; m++) { x += S[m]; } s.insert(x); } } while (q--) { int x; cin >> x; if (x==1) { int z; cin >> z; char y; cin >> y; S[z] = y; } else { string a; cin >> a; if (s.count(a)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } } }