#include #include #include #include #include #include using namespace std; const int INF = INT_MAX; int LIS(const vector&L){ vector lis(L.size()+1, INF); for (int l:L){ *upper_bound(lis.begin(), lis.end(), l) = l; } return L.size()-(lower_bound(lis.begin(),lis.end(),INF)-lis.begin()); } int main(){ int N,Q; cin >> N >> Q; string S; cin >> S; map dic = {{'A',0},{'B',1},{'C',2},{'D',3}}; vector seq(N); for (int i=0; i> query; if (query=="1"){ int x; char c; cin >> x >> c; --x; seq[x] = dic[c]; }else if (query=="2"){ int l,r; cin >> l >> r; --l; --r; vector sub_seq(seq.begin()+l,seq.begin()+r+1); cout<