Build-Cactus
(2) Cactus-DFS
(3) Form the pairs , where is the set of nodes from
   that map to the leaf of .
(4) For each pair , add a link between a node from in
   and a node from in . If is odd, then connect a node in to a node in
   a different leaf .
Algorithm 9: Naor-Gusfield-Martel-Aug-1 .