an embedded planar graph can be built from a blossom tree by connecting each opening stem to a closing stem. one visits the half-edges by going around the graph clockwise starting at an opening stem. if the tree is rooted, one usually starts at the root. the algorithm is analogous to parenthesis matching and uses a stack. at each stage, if the type of the current half-edge formula_1 is the same as the half edge at the top of the stack, formula_1 is pushed onto the stack. if the colors differ, the stack is popped and the two half-edges are connected. if we orient the added edges from opening to closing stem, we have no counter-clockwised edges. this process takes linear time.