#include<vector>
#include<cstdio>
using namespace std;
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define sz 10100
int n;
vector<pair<int,int>> adj[sz+5],vden[sz+5];
int anc[sz+5][15];
int parent[sz+5],subtree[sz+5];
int mainarr[sz+5];
int vchain[sz+5],povinc[sz+5];
int headofchain[sz+5];
int level[sz+5];
int tree[6*sz +5];
int m=0,chaino=0,den=0;
int maxi(int a,int b) {
if(a>=b) return a;
else return b;
}
int mini(int a,int b) {
if(a>=b) return b;
else return a;
}
void build(int node,int s,int e) {
if(s==e) {
tree[node]=mainarr[s];
}
else {
int mid=(s+e)/2;
build(2*node,s,mid);
build(2*node +1,mid+1,e);
tree[node]=maxi(tree[2*node],tree[2*node +1]);
}
}
void update(int node,int s,int e,int idx,int val) {
if(s==e) {
tree[node]=val;
mainarr[idx]=val;
}
else {
int mid=(s+e)/2;
if(s<=idx && idx<=mid) {
update(2*node,s,mid,idx,val);
}
else {
update(2*node +1,mid+1,e,idx,val);
}
tree[node]=maxi(tree[2*node],tree[2*node +1]);
}
}
int query(int node,int s,int e,int l,int r) {
if(r<s || e<l) return -1;
if(s>=l && e<=r) return tree[node];
int mid=(s+e)/2;
int p1=query(2*node,s,mid,l,r);
int p2=query(2*node +1,mid+1,e,l,r);
return maxi(p1,p2);
}
void dfs1(int cur,int prev) {
int i,j,k;
anc[cur][0]=prev;
subtree[cur]=1;
parent[cur]=prev;
for(i=0;i<adj[cur].size();i++) {
if(adj[cur][i].f!=prev) {
level[adj[cur][i].f]=level[cur] +1;
dfs1(adj[cur][i].f,cur);
subtree[cur]+=subtree[adj[cur][i].f];
}
}
}
void hld1(int cur,int prev,int cost) {
int i,j;
if(den==0) {
headofchain[chaino]=cur;
den=1;
}
vchain[cur]=chaino;
povinc[cur]=m;
mainarr[m++]=cost;
int mss=-1,vtx,ec;
for(i=0;i<adj[cur].size();i++) {
if(adj[cur][i].f!=prev) {
if(subtree[adj[cur][i].f]>mss || mss==-1) {
mss=subtree[adj[cur][i].f];
vtx=adj[cur][i].f;
ec=adj[cur][i].s;
}
}
}
if(mss!=-1) hld1(vtx,cur,ec);
for(i=0;i<adj[cur].size();i++) {
if(adj[cur][i].f!=prev && adj[cur][i].f!=vtx) {
den=0;
chaino++;
hld1(adj[cur][i].f,cur,adj[cur][i].s);
}
}
}
void precompute() {
int i,j;
//for(i=1;i<=n;i++) anc[i][0]=parent[i];
// for(i=1;i<=n;i++) {
// for(j=1;j<=14;j++) {
// anc[i][j]=-1;
// }
// }
for(i=1;i<=n;i++) {
for(j=1;j<=14;j++) {
if(anc[i][j-1]!=-1) {
anc[i][j]=anc[anc[i][j-1]][j-1];
}
}
}
}
int lca(int x,int y) {
int i,j,k,lg;
if(level[y]>level[x]) swap(x,y);
for(lg=0;1<<lg<=level[x];lg++) {
lg++;
}
lg--;
for(i=lg;i>=0;i--) {
if((level[x]-level[y])>=(1<<i)) {
x=anc[x][i];
}
}
if(x==y) return x;
for(i=lg;i>=0;i--) {
if(anc[x][i]!=-1 && anc[x][i]!=anc[y][i]) {
x=anc[x][i];
y=anc[y][i];
//return parent[x];
}
}
return parent[x];
}
int querybreak(int u,int v) {
if(level[v]>level[u]) swap(u,v);
int uchain=vchain[u];
int vchaino=vchain[v];
int ans=0,val,mne,mxe;
//cout<<"u="<<u<<" v="<<v<<"\n";
while(1) {
if(u==v) break;;
uchain=vchain[u];
//cout<<"uchain="<<uchain<<" "<<vchaino<<"\n";
if(uchain==vchaino) { // u at higher level and v at lower level
if(level[v]>level[u]) swap(u,v);
mne=mini(povinc[v]+1,povinc[u]);
mxe=maxi(povinc[v]+1,povinc[u]);
//cout<<"mne="<<mne<<" mxe="<<mxe<<"\n";
val=query(1,1,m,mne,mxe);
//cout<<val<<"\n";
ans=maxi(ans,val);
break;
}
//cout<<povinc[u]<<" "<<headofchain[uchain]<<" "<<povinc[headofchain[uchain]]<<"\n";
mne=mini(povinc[u],povinc[headofchain[uchain]]);
mxe=maxi(povinc[u],povinc[headofchain[uchain]]);
val=query(1,1,m,mne,mxe);
ans=maxi(ans,val);
u=headofchain[uchain];
u=parent[u];
}
return ans;
}
int _querybreak(int u,int v) {
int la=lca(u,v);
if(level[v]>level[u]) swap(u,v);
// cout<<"u="<<u<<" v="<<v<<"\n";
// cout<<"lca="<<la<<"\n";
int v1=querybreak(u,la);
//cout<<"\n";
int v2=querybreak(v,la);
//cout<<"v1="<<v1<<" v2="<<v2<<"\n";
return maxi(v1,v2);
}
int main() {
// ios_base::sync_with_stdio(0);
// cin.tie(0);
// cout.tie(0);
int i,j,k;
int t;
scanf("%d",&t);
while(t--) {
scanf("%d",&n);
chaino=0;m=0;den=0;
for(i=0;i<=n;i++) {
adj[i].clear();
vden[i].clear();
headofchain[i]=-1;
}
int u,v,ec;
for(i=1;i<=(n-1);i++) {
scanf("%d %d %d\n",&u,&v,&ec);
adj[u].pb(mp(v,ec));
adj[v].pb(mp(u,ec));
vden[i].pb(mp(u,v));
for(j=1;j<=14;j++) {
anc[i][j]=-1;
}
}
level[1]=0;
dfs1(1,0);
hld1(1,0,0);
precompute();
m=m-1;
build(1,1,m);
int x,y;
while(1) {
char s[10];
scanf("%s",s);
if(s[0]=='D') break;
if(s[0]=='Q') {
scanf("%d %d",&x,&y);
printf("%d\n",_querybreak(x,y));
}
else {
scanf("%d %d",&x,&y);
//cout<<"x="<<x<<" y="<<y<<"\n";
int fn=vden[x][0].first,sn=vden[x][0].second;
//cout<<fn<<" "<<sn<<"\n";
if(level[sn]>level[fn]) swap(fn,sn);
//cout<<povinc[fn]<<"\n";
update(1,1,m,povinc[fn],y);
//cout<<tree[2]<<"\n";
}
}
}
return 0;
}
I2luY2x1ZGU8dmVjdG9yPgojaW5jbHVkZTxjc3RkaW8+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lICAgIGYgICAgICAgICAgICAgICBmaXJzdAojZGVmaW5lICAgIHMgICAgICAgICAgICAgICBzZWNvbmQKI2RlZmluZSAgICBwYiAgICAgICAgICAgICAgcHVzaF9iYWNrCiNkZWZpbmUgICAgbXAgICAgICAgICAgICAgIG1ha2VfcGFpcgojZGVmaW5lICAgIHN6ICAgICAgICAgICAgICAxMDEwMAoKaW50IG47CnZlY3RvcjxwYWlyPGludCxpbnQ+PiBhZGpbc3orNV0sdmRlbltzeis1XTsKaW50IGFuY1tzeis1XVsxNV07CmludCBwYXJlbnRbc3orNV0sc3VidHJlZVtzeis1XTsKaW50IG1haW5hcnJbc3orNV07CmludCB2Y2hhaW5bc3orNV0scG92aW5jW3N6KzVdOwppbnQgaGVhZG9mY2hhaW5bc3orNV07CmludCBsZXZlbFtzeis1XTsKaW50IHRyZWVbNipzeiArNV07CgppbnQgbT0wLGNoYWlubz0wLGRlbj0wOwoKaW50IG1heGkoaW50IGEsaW50IGIpIHsKICAgIAogICAgaWYoYT49YikgcmV0dXJuIGE7CiAgICBlbHNlIHJldHVybiBiOwp9CgppbnQgbWluaShpbnQgYSxpbnQgYikgewogICAgCiAgICBpZihhPj1iKSByZXR1cm4gYjsKICAgIGVsc2UgcmV0dXJuIGE7Cn0KCnZvaWQgYnVpbGQoaW50IG5vZGUsaW50IHMsaW50IGUpIHsKICAgIAogICAgaWYocz09ZSkgewogICAgICAgIHRyZWVbbm9kZV09bWFpbmFycltzXTsKICAgIH0KICAgIGVsc2UgewogICAgICAgIAogICAgICAgIGludCBtaWQ9KHMrZSkvMjsKICAgICAgICAKICAgICAgICBidWlsZCgyKm5vZGUscyxtaWQpOwogICAgICAgIGJ1aWxkKDIqbm9kZSArMSxtaWQrMSxlKTsKICAgICAgICB0cmVlW25vZGVdPW1heGkodHJlZVsyKm5vZGVdLHRyZWVbMipub2RlICsxXSk7CiAgICB9Cn0KCnZvaWQgdXBkYXRlKGludCBub2RlLGludCBzLGludCBlLGludCBpZHgsaW50IHZhbCkgewogICAgCiAgICBpZihzPT1lKSB7CiAgICAgICAgdHJlZVtub2RlXT12YWw7CiAgICAgICAgbWFpbmFycltpZHhdPXZhbDsKICAgIH0KICAgIGVsc2UgewogICAgICAgIAogICAgICAgIGludCBtaWQ9KHMrZSkvMjsKICAgICAgICAKICAgICAgICBpZihzPD1pZHggJiYgaWR4PD1taWQpIHsKICAgICAgICAgICAgdXBkYXRlKDIqbm9kZSxzLG1pZCxpZHgsdmFsKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHVwZGF0ZSgyKm5vZGUgKzEsbWlkKzEsZSxpZHgsdmFsKTsKICAgICAgICB9CiAgICAgICAgdHJlZVtub2RlXT1tYXhpKHRyZWVbMipub2RlXSx0cmVlWzIqbm9kZSArMV0pOwogICAgfQp9CgppbnQgcXVlcnkoaW50IG5vZGUsaW50IHMsaW50IGUsaW50IGwsaW50IHIpIHsKICAgIAogICAgaWYocjxzIHx8IGU8bCkgcmV0dXJuIC0xOwogICAgCiAgICBpZihzPj1sICAmJiBlPD1yKSByZXR1cm4gdHJlZVtub2RlXTsKICAgIAogICAgaW50IG1pZD0ocytlKS8yOwogICAgCiAgICBpbnQgcDE9cXVlcnkoMipub2RlLHMsbWlkLGwscik7CiAgICBpbnQgcDI9cXVlcnkoMipub2RlICsxLG1pZCsxLGUsbCxyKTsKICAgIAogICAgcmV0dXJuIG1heGkocDEscDIpOwp9CnZvaWQgZGZzMShpbnQgY3VyLGludCBwcmV2KSB7CiAgICAKICAgIGludCBpLGosazsKICAgIGFuY1tjdXJdWzBdPXByZXY7CiAgICBzdWJ0cmVlW2N1cl09MTsKICAgIHBhcmVudFtjdXJdPXByZXY7CiAgICAKICAgIGZvcihpPTA7aTxhZGpbY3VyXS5zaXplKCk7aSsrKSB7CiAgICAgICAgCiAgICAgICAgaWYoYWRqW2N1cl1baV0uZiE9cHJldikgewogICAgICAgICAgICAKICAgICAgICAgICAgbGV2ZWxbYWRqW2N1cl1baV0uZl09bGV2ZWxbY3VyXSArMTsKICAgICAgICAgICAgZGZzMShhZGpbY3VyXVtpXS5mLGN1cik7CiAgICAgICAgICAgIAogICAgICAgICAgICBzdWJ0cmVlW2N1cl0rPXN1YnRyZWVbYWRqW2N1cl1baV0uZl07CiAgICAgICAgfQogICAgfQp9Cgp2b2lkIGhsZDEoaW50IGN1cixpbnQgcHJldixpbnQgY29zdCkgewogICAgCiAgICBpbnQgaSxqOwogICAgCiAgICBpZihkZW49PTApIHsKICAgICAgICBoZWFkb2ZjaGFpbltjaGFpbm9dPWN1cjsKICAgICAgICBkZW49MTsKICAgIH0KICAgIHZjaGFpbltjdXJdPWNoYWlubzsKICAgIHBvdmluY1tjdXJdPW07CiAgICBtYWluYXJyW20rK109Y29zdDsKICAgIAogICAgaW50IG1zcz0tMSx2dHgsZWM7CiAgICAKICAgIGZvcihpPTA7aTxhZGpbY3VyXS5zaXplKCk7aSsrKSB7CiAgICAgICAgCiAgICAgICAgaWYoYWRqW2N1cl1baV0uZiE9cHJldikgewogICAgICAgICAgICAKICAgICAgICAgICAgaWYoc3VidHJlZVthZGpbY3VyXVtpXS5mXT5tc3MgfHwgbXNzPT0tMSkgewogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBtc3M9c3VidHJlZVthZGpbY3VyXVtpXS5mXTsKICAgICAgICAgICAgICAgIHZ0eD1hZGpbY3VyXVtpXS5mOwogICAgICAgICAgICAgICAgZWM9YWRqW2N1cl1baV0uczsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIAogICAgaWYobXNzIT0tMSkgaGxkMSh2dHgsY3VyLGVjKTsKICAgIAogICAgZm9yKGk9MDtpPGFkaltjdXJdLnNpemUoKTtpKyspIHsKICAgICAgICAKICAgICAgICBpZihhZGpbY3VyXVtpXS5mIT1wcmV2ICYmIGFkaltjdXJdW2ldLmYhPXZ0eCkgewogICAgICAgICAgICBkZW49MDsKICAgICAgICAgICAgY2hhaW5vKys7CiAgICAgICAgICAgIGhsZDEoYWRqW2N1cl1baV0uZixjdXIsYWRqW2N1cl1baV0ucyk7CiAgICAgICAgfQogICAgfQp9Cgp2b2lkIHByZWNvbXB1dGUoKSB7CiAgICAKICAgIGludCBpLGo7CiAgICAvL2ZvcihpPTE7aTw9bjtpKyspIGFuY1tpXVswXT1wYXJlbnRbaV07CiAgICAvLyBmb3IoaT0xO2k8PW47aSsrKSB7CiAgICAvLyAgICAgZm9yKGo9MTtqPD0xNDtqKyspIHsKICAgIC8vICAgICAgICAgYW5jW2ldW2pdPS0xOwogICAgLy8gICAgIH0KICAgIC8vIH0KICAgIAogICAgZm9yKGk9MTtpPD1uO2krKykgewogICAgICAgIGZvcihqPTE7ajw9MTQ7aisrKSB7CiAgICAgICAgICAgIGlmKGFuY1tpXVtqLTFdIT0tMSkgewogICAgICAgICAgICAgICAgYW5jW2ldW2pdPWFuY1thbmNbaV1bai0xXV1bai0xXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KfQoKaW50IGxjYShpbnQgeCxpbnQgeSkgewogICAgCiAgICBpbnQgaSxqLGssbGc7CiAgICBpZihsZXZlbFt5XT5sZXZlbFt4XSkgc3dhcCh4LHkpOwogICAgCiAgICBmb3IobGc9MDsxPDxsZzw9bGV2ZWxbeF07bGcrKykgewogICAgICAgIGxnKys7CiAgICB9CiAgICBsZy0tOwogICAgZm9yKGk9bGc7aT49MDtpLS0pIHsKICAgICAgICAKICAgICAgICBpZigobGV2ZWxbeF0tbGV2ZWxbeV0pPj0oMTw8aSkpIHsKICAgICAgICAgICAgeD1hbmNbeF1baV07CiAgICAgICAgfQogICAgfQogICAgaWYoeD09eSkgcmV0dXJuIHg7CiAgICAKICAgIGZvcihpPWxnO2k+PTA7aS0tKSB7CiAgICAgICAgCiAgICAgICAgaWYoYW5jW3hdW2ldIT0tMSAmJiBhbmNbeF1baV0hPWFuY1t5XVtpXSkgewogICAgICAgICAgICB4PWFuY1t4XVtpXTsKICAgICAgICAgICAgeT1hbmNbeV1baV07CiAgICAgICAgICAgIC8vcmV0dXJuIHBhcmVudFt4XTsKICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gcGFyZW50W3hdOwp9CgppbnQgcXVlcnlicmVhayhpbnQgdSxpbnQgdikgewogICAgCiAgICBpZihsZXZlbFt2XT5sZXZlbFt1XSkgc3dhcCh1LHYpOwogICAgaW50IHVjaGFpbj12Y2hhaW5bdV07CiAgICBpbnQgdmNoYWlubz12Y2hhaW5bdl07CiAgICBpbnQgYW5zPTAsdmFsLG1uZSxteGU7CiAgICAKICAgIC8vY291dDw8InU9Ijw8dTw8IiB2PSI8PHY8PCJcbiI7CiAgICB3aGlsZSgxKSB7CiAgICAgICAgCiAgICAgICAgaWYodT09dikgYnJlYWs7OwogICAgICAgIAogICAgICAgIHVjaGFpbj12Y2hhaW5bdV07CiAgICAgICAgLy9jb3V0PDwidWNoYWluPSI8PHVjaGFpbjw8IiAiPDx2Y2hhaW5vPDwiXG4iOwogICAgICAgIGlmKHVjaGFpbj09dmNoYWlubykgeyAgLy8gdSBhdCBoaWdoZXIgbGV2ZWwgYW5kIHYgYXQgbG93ZXIgbGV2ZWwKICAgICAgICAgICAgIAogICAgICAgICAgICAgaWYobGV2ZWxbdl0+bGV2ZWxbdV0pIHN3YXAodSx2KTsKICAgICAgICAgICAgIAogICAgICAgICAgICAgbW5lPW1pbmkocG92aW5jW3ZdKzEscG92aW5jW3VdKTsKICAgICAgICAgICAgIG14ZT1tYXhpKHBvdmluY1t2XSsxLHBvdmluY1t1XSk7CiAgICAgICAgICAgICAKICAgICAgICAgICAgIC8vY291dDw8Im1uZT0iPDxtbmU8PCIgbXhlPSI8PG14ZTw8IlxuIjsKICAgICAgICAgICAgIHZhbD1xdWVyeSgxLDEsbSxtbmUsbXhlKTsKICAgICAgICAgICAgIC8vY291dDw8dmFsPDwiXG4iOwogICAgICAgICAgICAgYW5zPW1heGkoYW5zLHZhbCk7CiAgICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgLy9jb3V0PDxwb3ZpbmNbdV08PCIgIjw8aGVhZG9mY2hhaW5bdWNoYWluXTw8IiAiPDxwb3ZpbmNbaGVhZG9mY2hhaW5bdWNoYWluXV08PCJcbiI7CiAgICAgICAgbW5lPW1pbmkocG92aW5jW3VdLHBvdmluY1toZWFkb2ZjaGFpblt1Y2hhaW5dXSk7CiAgICAgICAgbXhlPW1heGkocG92aW5jW3VdLHBvdmluY1toZWFkb2ZjaGFpblt1Y2hhaW5dXSk7CiAgICAgICAgCiAgICAgICAgdmFsPXF1ZXJ5KDEsMSxtLG1uZSxteGUpOwogICAgICAgIGFucz1tYXhpKGFucyx2YWwpOwogICAgICAgIHU9aGVhZG9mY2hhaW5bdWNoYWluXTsKICAgICAgICB1PXBhcmVudFt1XTsKICAgIH0KICAgIHJldHVybiBhbnM7Cn0KCmludCBfcXVlcnlicmVhayhpbnQgdSxpbnQgdikgewogICAgCiAgICBpbnQgbGE9bGNhKHUsdik7CiAgICBpZihsZXZlbFt2XT5sZXZlbFt1XSkgc3dhcCh1LHYpOwogICAgLy8gY291dDw8InU9Ijw8dTw8IiB2PSI8PHY8PCJcbiI7CiAgICAvLyBjb3V0PDwibGNhPSI8PGxhPDwiXG4iOwogICAgCiAgICBpbnQgdjE9cXVlcnlicmVhayh1LGxhKTsKICAgIC8vY291dDw8IlxuIjsKICAgIGludCB2Mj1xdWVyeWJyZWFrKHYsbGEpOwogICAgCiAgICAvL2NvdXQ8PCJ2MT0iPDx2MTw8IiB2Mj0iPDx2Mjw8IlxuIjsKICAgIHJldHVybiBtYXhpKHYxLHYyKTsKfQoKaW50IG1haW4oKSB7CiAgICAKICAgIC8vIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oMCk7CiAgICAvLyBjaW4udGllKDApOwogICAgLy8gY291dC50aWUoMCk7CiAgICAKICAgIGludCBpLGosazsKICAgIAogICAgaW50IHQ7CiAgICBzY2FuZigiJWQiLCZ0KTsKICAgIHdoaWxlKHQtLSkgewogICAgICAgIAogICAgICAgIHNjYW5mKCIlZCIsJm4pOwogICAgICAgIAogICAgICAgIGNoYWlubz0wO209MDtkZW49MDsKICAgICAgICBmb3IoaT0wO2k8PW47aSsrKSB7CiAgICAgICAgICAgIAogICAgICAgICAgICBhZGpbaV0uY2xlYXIoKTsKICAgICAgICAgICAgdmRlbltpXS5jbGVhcigpOwogICAgICAgICAgICBoZWFkb2ZjaGFpbltpXT0tMTsKICAgICAgICB9CiAgICAgICAgaW50IHUsdixlYzsKICAgICAgICAKICAgICAgICBmb3IoaT0xO2k8PShuLTEpO2krKykgewogICAgICAgICAgICAKICAgICAgICAgICAgc2NhbmYoIiVkICVkICVkXG4iLCZ1LCZ2LCZlYyk7CiAgICAgICAgICAgIGFkalt1XS5wYihtcCh2LGVjKSk7CiAgICAgICAgICAgIGFkalt2XS5wYihtcCh1LGVjKSk7CiAgICAgICAgICAgIHZkZW5baV0ucGIobXAodSx2KSk7CiAgICAgICAgICAgIAogICAgICAgICAgICBmb3Ioaj0xO2o8PTE0O2orKykgewogICAgICAgICAgICAgICAgYW5jW2ldW2pdPS0xOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGxldmVsWzFdPTA7CiAgICAgICAgZGZzMSgxLDApOwogICAgICAgIGhsZDEoMSwwLDApOwogICAgICAgIHByZWNvbXB1dGUoKTsKICAgICAgICBtPW0tMTsKICAgICAgICBidWlsZCgxLDEsbSk7CiAgICAgICAgCiAgICAgICAgaW50IHgseTsKICAgICAgICAKICAgICAgICB3aGlsZSgxKSB7CiAgICAgICAgICAgIAogICAgICAgICAgICBjaGFyIHNbMTBdOwogICAgICAgICAgICBzY2FuZigiJXMiLHMpOwogICAgICAgICAgICBpZihzWzBdPT0nRCcpIGJyZWFrOwogICAgICAgICAgICAKICAgICAgICAgICAgaWYoc1swXT09J1EnKSB7CiAgICAgICAgICAgICAgIHNjYW5mKCIlZCAlZCIsJngsJnkpOwogICAgICAgICAgICAgICBwcmludGYoIiVkXG4iLF9xdWVyeWJyZWFrKHgseSkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc2NhbmYoIiVkICVkIiwmeCwmeSk7CiAgICAgICAgICAgICAgICAvL2NvdXQ8PCJ4PSI8PHg8PCIgeT0iPDx5PDwiXG4iOwogICAgICAgICAgICAgICAgaW50IGZuPXZkZW5beF1bMF0uZmlyc3Qsc249dmRlblt4XVswXS5zZWNvbmQ7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIC8vY291dDw8Zm48PCIgIjw8c248PCJcbiI7CiAgICAgICAgICAgICAgICBpZihsZXZlbFtzbl0+bGV2ZWxbZm5dKSBzd2FwKGZuLHNuKTsKICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgLy9jb3V0PDxwb3ZpbmNbZm5dPDwiXG4iOwogICAgICAgICAgICAgICAgdXBkYXRlKDEsMSxtLHBvdmluY1tmbl0seSk7CiAgICAgICAgICAgICAgICAvL2NvdXQ8PHRyZWVbMl08PCJcbiI7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gMDsKfQ==