Find the shortest path.