#include #include #include #include #include #include #include #define ll long long #define INF 2000000000 #define NINF -2000000000 #define MOD 1000000007 #define br '\n' using namespace std; int fast_pow(long long base,long long n) { if(n==0) return 1; if(n==1) return base; long long halfn=fast_pow(base,n/2); if(n%2==0) return(halfn*halfn)%MOD; else return(((halfn*halfn)%MOD)*base)%MOD; } int w_count[100001][26]={0}; int main() { ios_base::sync_with_stdio(false); cin.tie(0); //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); int n,q; cin>>n>>q; char s[n+1]; cin>>s; for(int i=0;i>opt; if(opt==1) { cin>>start>>end>>t; for(int i=start;i<=end;i++) { s[i]=(s[i]+t)%26; } for(int i=0;i<26;i++) { w_count[0][i]=0; } w_count[0][s[0]]++; for(int i=1;i>start>>end; int count[26]={0}; for(int i=0;i<26;i++) { if(start==0) count[i]=w_count[end][i]; else count[i]=w_count[end][i]-w_count[start-1][i]; } odd=even=0; for(int i=0;i<26;i++) { if(count[i]) { w=fast_pow(2,count[i]-1); if(odd!=0) odd=((w*odd)%MOD+(w*even)%MOD)%MOD; else odd=w; if(even!=0) even=(w*even)%MOD; else even=w; } } cout<<(odd+even-1)%MOD<