#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int count_palim(int i,int j,string s) { int count=0; for(int k = i;k<=j;k++) { count = (count+1)%1000000007; int t1=k-1,t2=k+1; while(t1>=i&&t2<=j) { if(s[t1]==s[t2])count = (count+1)%1000000007; else break; t1--; t2++; } t1=k,t2=k+1; while(t1>=i&&t2<=j) { if(s[t1]==s[t2])count = (count+1)%1000000007; else break; t1--; t2++; } //cout<> n >> q; string s; cin >> s; for(int a0 = 0; a0 < q; a0++){ int type,i,j,t; cin>>type; if(type==1)cin>>i>>j>>t; else cin>>i>>j; if(type==2) { cout<