#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 main(){ int n; int q; cin >> n >> q; string s; cin >> s; for(int a0 = 0; a0 < q; a0++){ // your code goes here int no, i ,j , t; cin>>no; if(no==1){ cin>>i>>j>>t; for(int index = i; index <= j ; index++){ s[index] += t; } } else{ cin>>i>>j; vector store(26); for(int index = i; index <=j; index++){ store[s[index]-'a']++; } long long ans = 1, ansf, det = 0; for(int m = 0; m <26; m++){ ans *= (1+store[m]/2); if(store[m]%2 == 0 && store[m] != 0) det = 1; } ansf = ans; if(det == 0) ansf = 0; for(int m=0;m<26;m++){ ansf += ans/((store[m]+2)/2) * ((store[m]+1)/2); } cout<