#include #define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define FOR(i,a,b) for(i=a;i=b;--i) #define FORIT(it,a,b) for(it=a;it!=b;it++) #define tpI(i,a,b,v) for(i=a;i %d\n",m,x) using namespace std; int cps[1000+1][1000+1]; void countPS(string str) { int N = str.length(); // create a 2D array to store the count of palindromic // subsequence memset(cps, 0 ,sizeof(cps)); // palindromic subsequence of length 1 for (int i=0; i122) str[i]=str[i]-122+96; } return str; } int main() { int n,q; cin>>n>>q; string str; cin>>str; int l = str.length(),last; countPS(str); while(q--) { int choice ; cin>>choice; if(choice==1) { int start,end,t; cin>>start>>end>>t; str=shift(str,start,end,t); last=1; } else { int start,end; cin>>start>>end; if(last==1) countPS(str); cout<