Traversal for graph.