#include #include using namespace std; //ifstream fin("odd.in"); //ofstream fout("odd.out"); int fr[31],n,m,ok,nrIMP,x,y,cer,nrq; char ch; struct graf{int used; char ch; vectorlst;} nod[200005]; void calc() { nrIMP=0; for(int i=0;i<=30;i++) if(fr[i]%2!=0) nrIMP++; } void bkt(int poz) { nod[poz].used=nrq; fr[nod[poz].ch-'a']++; if(poz==y) {ok=1; calc();} else { for(int i=0;i>n>>m; cin.get(); for(int i=1;i<=n;i++) cin>>nod[i].ch; for(int i=1;i<=n-1;i++) { cin>>x>>y; nod[x].lst.push_back(y); nod[y].lst.push_back(x); } for(int i=1;i<=m;i++) { cin>>cer; if(cer==1) { ok=0; nrq++; cin>>x>>y; cout<>x>>ch; nod[++n].ch=ch; nod[n].lst.push_back(x); nod[x].lst.push_back(n); } } return 0; }