#include using namespace std; #include #define q int #define c(i,v,n)for(q i=v;ix||x>j;}};S o(S L,S R){S K;c(i,0,4)c(j,i,4){K.D[i][j]=1e9;c(k,i,j+1)K.D[i][j]=min(K.D[i][j],L.D[i][k]+R.D[k][j]);}return K;}S e(){return S();}main(){q N,Q,l;string T;cin>>N>>Q>>T;vectorA(N);c(i,0,N)A[i]=S(T[i]-'A');atcoder::segtreeg(A);while(Q--){cin>>N;if(--N){cin>>N>>l;cout<>l>>c;g.set(l-1,S(c-'A'));}}}