MXMN-Editorial

Assume the current tree being processed by your centroid decomposition is T, then take all the leaves from T, and build an auxiliary tree using using them, on the basis of the relative position and lca of these nodes in the second binary tree. Please try re reading the editorial. For further assistance on auxiliary trees, ICL1705 - Editorial