LevelGraph's BFS constructor