#include #include #define dev 1000000007 using namespace std; long long palin(string str,int i,int j) { if(i>j) return 0; else if(i==j) return 1; else { if(str[i]==str[j]) return (palin(str,i,j-1)+palin(str,i+1,j)+1)%dev; else return (palin(str,i,j-1)+palin(str,i+1,j)-palin(str,i+1,j-1))%dev; } } int main() { long long int n,fac,q; string str; cin>>n>>q; cin>>str; while(q--) { int c; cin>>c; if(c==1) { int i,j,t; cin>>i>>j>>t; t=t%26; for(int s=i;s<=j;s++) { if(t+str[s]<=122) str[s]=str[s]+t; else str[s]=str[s]+t-26; } } else { int i,j; cin>>i>>j; long long ans=palin(str,i,j); cout<