rt
int pop(int x) { int rt = fnd(x), new_rt = unn(l[rt], r[rt]); p[rt] = new_rt, p[new_rt] = new_rt; return new_rt; }