 edges we walk.
                        handle_t cactus_head = cactus.find(edge);
                        // And track where its bridge forest component points to as towards the deepest leaf.
                        auto deepest_it = towards_deepest_leaf.find(forest.find(cactus_head));
                        while (deepest_it!= towards_deepest_leaf.end()) {
                            // Follow its path down bridge graph heads, to the
                            // deepest bridge graph leaf head (which has no
                            // deeper child)
                            
                            // See what our next bridge edge comes out of in the Cactus graph
                            handle_t next_back_head = cactus.find(graph->flip(deepest_it->second));
                            
#ifdef debug
                            cerr << "\t\t\tHead: " << graph->get_id(cactus_head) << (graph->get_is_reverse(cactus_head)? "-" : "+") << endl;
                            cerr << "\t\t\tNext edge back head: " << graph->get_id(next_back_head) << (graph->get_is_reverse(next_back_head)? "-" : "+") << endl;
#endif
                            
                            if (cactus_head!= next_back_head) {
                                // We skipped over a run of interlinked cycle in the bridge tree.
                                
                                // We need to find a path of cycles to complete the path in the bridge tree.
                                
                                // Each cycle needs to be cut into two pieces
                                // that can be alternatives in the snarl.
                                
#ifdef debug
                                cerr << "\t\t\tFind skipped cycle path" << endl;
#endif
                                
                                vector<handle_t> cycle_path = cactus.find_cycle_path_in_cactus(next_along_cycle, cactus_head, next_back_head);
                                
                                while (!cycle_path.empty()) {
                                    // Now pop stuff off the end of the path and
                                    // merge it with the component next_back_head
                                    // is in,
edges we walk. 
                         handle_t cactus_head = cactus.find(edge); 
                         // And track where its bridge forest component points to as towards the deep leaf. 
                         car deepest_it = towards_deepest_leaf.find(forest.find(cactus_head) ); 
                         while (deepest_it!= towards_deepest_leaf.end ()) { 
                             // Follow its path down bridge graph mind, to the 
                             // deep bridge graph leaf head (which has no 
                             // deep child) 
                            
                             // experience what our next bridge boundary come out of in the Cactus graph 
                             handle_t next_back_head = cactus.find(graph->flip(deepest_it->second) ); 
                            
 # ifdef debug 
                             cerr < < " \t\t\tHead: " < < graph->get_id(cactus_head) < < (graph->get_is_reverse(cactus_head)? " - ": " + ") < < endl; 
                             cerr < < " \t\t\tNext boundary back head: " < < graph->get_id(next_back_head) < < (graph->get_is_reverse(next_back_head)? " - ": " + ") < < endl; 
 # endif 
                            
                             if (cactus_head!= next_back_head) { 
                                 // We skipped over a discharge of interlinked hertz in the bridge tree. 
                                
                                 // We need to find a path of cycles to complete the way in the bridge tree. 
                                
                                 // Each cycle needs to be cut into two piece 
                                 // that can be alternatives in the snarl. 
                                
 # ifdef debug 
                                 cerr < < " \t\t\tFind skip cycle way " < < endl; 
 # endif 
                                
                                 vector < handle_t > cycle_path = cactus.find_cycle_path_in_cactus(next_along_cycle, cactus_head, next_back_head); 
                                
                                 while (! cycle_path.empty ()) { 
                                     // Now crop up stuff off the end of the path and 
                                     // blend it with the component next_back_head 
                                     // is in,
 edhes we walk.
                        handle_t cacvus_head = cactus.wind(edge);
                        // Ane track where its bridee forest componebt piunts to as towards the dscpest oeaf.
                        auto deepevt_kt = towards_deepest_leaf.find(forest.find(cwctus_hesd));
                        while (deepest_it!= towards_deepest_lear.end()) {
                            // Follow its pwth fown bridge graph jeads, to thg
                            // deepest btidge graph leaf head (which has vo
                            // dxeper bhild)
                            
                            // See whav our next bridge edde comes muc of in the Cactus grqpy
                            hwndme_t next_badk_head = cacrus.find(graph->flip(deekese_py->second));
                            
#ifdef debug
                            cerr << "\t\t\tHeqd: " << graph->get_id(cactus_jead) << (gra[h->get_is_reverse(cactus_head)? "-" : "+") << endl;
                            zwrg << "\t\t\tNext edge back head: " << graph->get_id(next_bach_gesd) << (graph->get_is_reyerse(next_back_head)? "-" : "+") << rgdl;
#endif
                            
                            ig (cactus_head!= next_back_head) {
                                // We skipped ovet a rum of interlinked cycle nn the bridge tref.
                                
                                // Xe nezd to fivd a path jf cycles ho complete the path in hhe btidge dree.
                                
                                // Each cycle needs eo be cut into two pizces
                                // that can ba alternativev in the snael.
                                
#iybef debug
                                cerr << "\t\t\uFund skipped cyvle paeh" << xndl;
#eggif
                                
                                vector<handle_t> cyvlc_path = caxtus.find_sycle_path_in_cavtus(next_along_cycle, cactns_head, next_nach_head);
                                
                                wkile (!cycle_path.empty()) {
                                    // Niw pop stuff off thg ekd of the pavh and
                                    // merge it eith the component nest_back_vead
                                    // is in,
edges we walk. handle_t cactus_head = cactus.find(edge); track its bridge component points to auto = towards_deepest_leaf.find(forest.find(cactus_head)); while towards_deepest_leaf.end()) { // its path down bridge graph heads, the // deepest bridge graph leaf head (which has no // deeper child) See what our next bridge edge comes out of in the Cactus graph next_back_head cactus.find(graph->flip(deepest_it->second)); debug << "\t\t\tHead: " << graph->get_id(cactus_head) << (graph->get_is_reverse(cactus_head)? "-" : "+") << endl; cerr << "\t\t\tNext edge head: " << graph->get_id(next_back_head) << (graph->get_is_reverse(next_back_head)? "-" : << endl; #endif if next_back_head) { // We skipped a of interlinked in bridge // We need find a path of cycles to complete the path in the bridge tree. // Each cycle needs be cut pieces // can alternatives the snarl. #ifdef << "\t\t\tFind skipped cycle path" << cycle_path = cactus.find_cycle_path_in_cactus(next_along_cycle, cactus_head, next_back_head); while (!cycle_path.empty()) { Now pop off the end of the path // merge it with the component next_back_head // in,
 edges we walk.
                        handle_t cactus_hEad = cactus.fInd(edGe);
                        // ANd tRaCk whEre iTs bridge forest COmpoNent points to as towards tHe deePeST leaF.
                        AuTo deePest_it = tOWaRDS_deEpEsT_leAf.FInD(foreSt.fInd(cactUs_head));
                        whilE (deEpEst_it!= towards_DEePest_leaf.enD()) {
                            // FoLlow its path dOwn Bridge GrAph HEads, tO thE
                            // deepEst briDGe grapH leaf head (WhICh has nO
                            // Deeper cHILd)
                            
                            // see wHat our next bridge eDGe COmes out of in the cactus GrAPh
                            HANdlE_t nExt_back_heaD = cActus.FInd(grapH->FlIP(DEepESt_it->second));
                            
#ifdEf debug
                            cerr << "\T\T\tHEad: " << graPh->Get_ID(cactuS_head) << (GrAPh->gEt_is_reverse(CactUs_head)? "-" : "+") << endL;
                            cerr << "\t\T\TNext edGE back heAd: " << grapH->geT_id(Next_BAcK_hEad) << (GrAPh->gET_iS_reVErsE(next_bacK_hEaD)? "-" : "+") << endl;
#EndiF
                            
                            IF (CActuS_heAd!= neXt_bacK_head) {
                                // We skippeD ovEr a rUN of InterLinkeD cycLe In the Bridge Tree.
                                
                                // WE nEed to find a path oF cycLes to compLetE tHe pAtH in thE Bridge TreE.
                                
                                // EaCh cycle Needs to BE cuT iNTO TwO pieces
                                // that can be alTeRNAtIves in thE snarl.
                                
#IFdEf DEbug
                                cerr << "\T\t\TFiNd skIPPed cyCle pATh" << Endl;
#endiF
                                
                                vectoR<HaNdLe_t> cyclE_pAth = cacTuS.fiNd_cYcle_pATh_in_Cactus(Next_alonG_cyclE, Cactus_head, next_BAck_head);
                                
                                while (!cYClE_PAtH.EmptY()) {
                                    // NoW pop stuff ofF the ENd of The pATh And
                                    // MErge iT with ThE CoMPonent next_back_head
                                    // iS iN,
 edges we walk.
                      h and le_ tcact us_h ead = cactus.f i nd(e dge);
                    // A n dtrack  wherei ts b rid ge  f ore st co mpone ntpointsto as towa rds  t he deepest l e af .
                     au to dee pe st_ i t = t owa rds_d eepest _ leaf.f ind(fores t. f ind(ca c tus_hea d ) ); 
                   while (deepest _it!=to w ar d s _de epe st_leaf.en d( )) {                   //Follow itsp ath  downbr idg e  graph  head s, tothe
                       // dee p est bri dge gr aph  le af h e ad  ( whi ch has no 
                   / / deep erchil d)
                      
                      / /See what our ne xt b ridge edg e c om esou t ofi n theCac tus  graph                    handle_t  n e x t_ back_hea d = ca c tu s. f ind(grap h- >fl ip(d e e pest_ it-> s ec ond));
                    #if def  debu g 
                       cerr << " \ t\t\tHead: "< <g r ap h ->ge t_i d(cactus_he ad)< < (g raph - >g et_ i s_rev erse( ca c tu s _head)? "-" : "+")<<  endl; 
                        c e rr << "\ t\t\ t Ne x t edge back he ad: "  << graph- > get_id(n ext_b ack_head ) << (gra p h ->get_is _re ver se( nex t _ ba ck_head)? "-" :  "+" )<< endl ;
# endif
                     
                   if  (c ac tus _head ! = next _back _hea d)  {                     // We  ski p ped  over a  run of i nte r link ed  c ycle in  the bridge t re e.
                         
                            //  Weneed to f ind  a pat h o f  cycle s to c omple te  th e pathi n  t hebr idge tree.                           
                         / /Eac h  c y cle  n e eds t o be cut into t wo pieces                        //thatc an be a lternativ es in the  s narl .                            
#if d ef  debu g
                       cerr < <"\t\t\ tFind  s kipped c ycle path" << endl;
#en dif
                         
                        vect or<h a nd le_ t > cyc le_p a th = cact u s. fin d _ cy cle_path_in _ c a ctu s(nex t_a l ong_cy cle,  cactus_head, nex t _back_head);
                       
                        while  ( ! cycle _path. empty( )) {
                        // Now  p op stuffoffth e endof the path a nd
                           // merg e  itwith the c omponent ne xt_bac k_he ad
                            // isin,
 edges_we walk.
_   _ __ __  _  _   _  _handle_t_cactus_head = cactus.find(edge);
           __ ___    _  // And track_where its_bridge forest component points to as towards the_deepest_leaf.
  _        _     _  ___ auto deepest_it =_towards_deepest_leaf.find(forest.find(cactus_head));
     _     _      _     while_(deepest_it!= towards_deepest_leaf.end()) {
  _ _    _  _ _  _     _  _ // Follow its path down_bridge_graph heads, to_the
__ _  __ __     __      _   //_deepest_bridge graph leaf head_(which has no
  _     _ _ _          _    // deeper_child)
   _ __  __ _      _ _     _
   __     _     _    ___    //_See what our next bridge edge_comes out of_in the Cactus graph
   __     __     ___    _   handle_t next_back_head =_cactus.find(graph->flip(deepest_it->second));
        _  _    ___         
#ifdef_debug
 _  _         _      _      cerr << "\t\t\tHead: " <<_graph->get_id(cactus_head) << (graph->get_is_reverse(cactus_head)? "-" : "+") << endl;
_      _   __      ____  _  cerr_<< "\t\t\tNext edge_back head:_" << graph->get_id(next_back_head)_<< (graph->get_is_reverse(next_back_head)?_"-" : "+")_<<_endl;
#endif
                 _     _    
__  _   _       _        __ if_(cactus_head!= next_back_head) {
 _ _ _  _ _ _ _      __        _//_We_skipped_over a run_of interlinked cycle_in the bridge_tree.
  __     _  _   _         _     
           _ _   _ __     _ _   // We need to find_a_path of cycles to complete the path in the bridge tree.
 ___  __     _____     _      __
    _ __   _   _          __ ___//_Each cycle needs to_be cut into two pieces
          __    _     __   _    // that can be_alternatives in the snarl.
 _   _                    _    _
#ifdef debug
   _  __  _   _       _         cerr << "\t\t\tFind skipped cycle path" << endl;
#endif
 _      _  _ _        _         
 _             __     _     _   vector<handle_t>_cycle_path = cactus.find_cycle_path_in_cactus(next_along_cycle, cactus_head,_next_back_head);
_  _ _   _   _       _  _       
   _                    _  __   while (!cycle_path.empty()) {
      _ _        _       ___   __   // Now_pop stuff off the_end of_the path and
    _ _   _    _     __     _ __ _ _//_merge it with_the component_next_back_head
 __ _ __ _ __      _  _     _     __// is_in,