Slove the shortest route