BFS Products

At the conclusion of the search the distance of each vertex from S is stored: