#include using namespace std; using ll=long long; constexpr int CHAR_NUM=26; struct S{ arrayMM,MA,A; ll MMA; void print(){ cout< struct segtree { int size, _n; vector seg; segtree(int n) { _n = n; size = 1; while (size < n) size <<= 1; seg = vector(size * 2, e()); } void set(int p, S val) { p += size; seg[p] = val; while (p /= 2) { seg[p] = op(seg[p * 2], seg[p * 2 + 1]); } } S prod(int l, int r) { S retL = e(), retR = e(); for (l += size, r += size; l < r; l /= 2, r /= 2) { if (l % 2) retL = op(retL, seg[l++]); if (r % 2) retR = op(seg[--r], retR); } return op(retL, retR); } S get(int p) { return seg[p + size]; } template int max_right(int L, F f) { L += size; S sm = e(); do { while (L % 2 == 0) L /= 2; if (!f(op(sm, seg[L]))) { while (L < size) { L *= 2; if (f(op(sm, seg[L]))) { sm = op(sm, seg[L]); L++; } } return L - size; } sm = op(sm, seg[L]); L++; } while ((L & -L) != L); return _n; } template int min_left(int R, F f) { R += size; S sm = e(); do { R--; while (R > 1 && R % 2 == 1) R /= 2; if (!f(op(seg[R], sm))) { while (R < size) { R = R * 2 + 1; if (f(op(seg[R], sm))) { sm = op(seg[R], sm); R--; } } return R + 1 - size; } sm = op(seg[R], sm); } while ((R & -R) != R); return 0; } }; } // namespace Lib int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin>>N; string T; cin>>T; Lib::segtree seg(N); for(int i=0;i>Q; while(Q--){ int a;; cin>>a; if(a==1){ int x; char c; cin>>x>>c; --x; S t=seg_e(); t.A[c-'A']=1; seg.set(x,t); }else if(a==2){ int l,r; cin>>l>>r; --l; cout<