Depth-first-search and graphy module