#include #define ff first #define ss second #define pb push_back #define mp make_pair #define len(s) s.length() #define forp(i,a,b) for( i=a;i<=b;i++) #define FOR(tt,a,b) for(int tt=a;tt<=b;tt++) #define rep(i,n) for( i=0;i=0;i--) #define forn(i,a,b) for( i=a;i>=b;i--) #define all(v) v.begin(),v.end() #define b(v) v.begin() #define e(v) v.end() #define mem(n,m) memset(n,m,sizeof(n)) #define lb lower_bound #define ub upper_bound #define pii pair #define pll pair #define vii vector #define vll vector #define gl(cin,s) getline(cin,s); #define bitc(n) __builtin_popcountll(n) #define present(s,x) (s.find(x) != s.end()) #define cpresent(s,x) (find(all(s),x) != s.end()) #define tr(container, it) for(__typeof(container.begin()) it = container.begin(); it != container.end(); it++) #define boost ios_base::sync_with_stdio(0) #define MOD 1000000007 #define EPSILON 1e-9 #define PI 3.14159265358979323846 #define SIZE 100001 typedef long long ll; typedef unsigned long long ull; typedef long double ldo; typedef double db ; using namespace std; ll func(string temp) { ll fans=0; ll val=len(temp); ll cnt[26]; ll mask = (1<>j)&1){ cnt[temp[j]-'a']++; } } ll NUM=0; for(ll j=0;j<26;j++){ if(cnt[j]%2) NUM++; } if(NUM<=1){ fans++; fans%=MOD; } } return fans; } int main() { /* #ifndef ONLINE_JUDGE freopen(fi, "r", stdin); #endif */ //freopen("route.in","r",stdin); //freopen("route.out","w",stdout); //cin.ignore(); //cin.clear(); boost; //cin.tie(0); //cout<<"Case #"<>n>>q; cin>>s; while(q--){ cin>>type; if(type==1){ cin>>x>>y>>t; forp(i,x,y){ ll VAL=s[i]-'a'; VAL+=t; VAL%=26; s[i]=(char)(VAL+'a'); } } else{ cin>>x>>y; string temp=""; forp(i,x,y){ temp+=s[i]; } ll fans=func(temp); cout<