#include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ long long int n,q,i,j; cin>>n>>q; string s; cin>>s; while(q--) { int k; cin>>k; if(k==1) { long long int m,n,t; cin>>m>>n>>t; for(i=m-1;i>m>>n; int t,i,a[55][55],p,cnt,j; string s1=s.substr(m,n-m); for(i=0;i<55;i++) for(j=0;j<55;j++) a[i][j]=0; p=s1.length(); for(i=p-1;i>=0;i--) { cnt=1; a[i][i]=1; if(i+1!=p){ if(s1[i]==s1[i+1]) { cnt++; a[i][i+1]=3;// in case aab-->a,a,aa } else a[i][i+1]=2; } for(j=i+2;j