BFS and DFS as Iterables for Node class