BFS Products

The path back from each vertex to S is also stored in the breadth-first tree: