Basic version with BFS-Traversal