#include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector vi; typedef vector vll; int inf_int=1e9; ll inf_ll=2e18; typedef pair pii; typedef pair pll; #define pb push_back const double pi=3.1415926535898; #define dout if(debug) cout #define fi first #define se second #define sp setprecision #define sz size() template void prin(vector >& a) { for(int i=0;i void prin(set >& a) { for(auto it=a.begin();it!=a.end();it++) { cout <fi <<" "<se<<"\n"; } } template void prin(vector& a) { for(int i=0;i void prin(set& a) { for(auto it=a.begin();it!=a.end();it++) { cout << *it<<" "; } } template void prin_new_line(vector& a) { for(int i=0;i void prin_new_line(vector >& a) { for(int i=0;i> n >> q; string a; cin >> a; for(int i=0;i> t; if(t==1) { int l,r,val; cin >> l >> r >> val; val=val%26; for(int e=l;e<=r;++e) { a[e]=(a[e]+val)%26; } } else { for(int i=0;i<26;i++) cnt[i]=0; int l,r; cin >> l >> r; for(int i=l;i<=r;i++) { cnt[a[i]]++; } ll ans=1; for(int i=0;i<26;i++) { ans=(ans*(cnt[i]+2)/2)%mod; } ans--; ll s=0; for(int i=0;i<26;i++) { if(cnt[i]) { int x=(cnt[i]+1)/2; for(int e=0;e<26;++e) { if(i==e) continue; x=(x*(cnt[e]+2)/2)%mod; } s+=x; } } // cout << ans<<"\n"; ans=(ans+s)%mod; cout << ans<<"\n"; } } } #define FILE "rollback" int main() { #ifdef ILDAR freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); #endif // ILDAR // freopen(FILE".in","r",stdin); // freopen(FILE".out","w",stdout); if(!debug) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } int t=1; // //scanf("%d",&t); // cin >> t; while(t--) solve(); return 0; }