Implement Bfs Using Python