simple bfs/dfs walk of a graph