p87 depth-first order graph traversal