Implemented depth-first traversal of graph from the specified node.