#include #include using namespace std; using ll=long long; constexpr int CHAR_NUM=26; struct S{ arrayMA,A; ll MMA; void print(){ cout<>N; string T; cin>>T; atcoder::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<