Implement Bfs Using Python Dictionaries