floyd warshall and path reconstruction