The F attribute defined on the set CITIES is used to store the distance from each city to the destination city.