<｜begin▁of▁sentence｜>### Instruction:
Imagine you're putting together a tour schedule for your band, and you're planning the logistics of traveling between three cities—let's call them 'A', 'B', and 'C'. Each leg of the journey has a different cost associated with it, which we can think of like the 'weight' of traveling that route. Traveling directly from 'A' (your starting city) to 'B' costs $1, heading from 'B' to 'C' runs at $2, and there's a direct but pricey option from 'A' to 'C' that costs $5. Interestingly enough, you can also circle back from city 'C' to 'A' at a cheaper rate of $1.

Now, as you're tuning your guitar and brainstorming the route, you’re puzzling over the most budget-friendly way to hit city 'C' from your starting point, city 'A'. Using the magic of Floyd's algorithm—like hitting the perfect riff that makes a complex song feel effortless—how would you figure out this tour's budget tour path and the total cost of getting to city 'C' from city 'A'? Keep in mind, it's not just about finding a path but ensuring that it's the one that keeps your travel expenses tuned to a minimum, much like finding harmony in a melody.
### Response:
import networkx as nx

# Create a weighted directed graph
G = nx.DiGraph()

# Add weighted edges to the graph
G.add_weighted_edges_from([
    ('A', 'B', 1),
    ('B', 'C', 2),
    ('A', 'C', 5),
    ('C', 'A', 1)
])

# Find all-pairs shortest path lengths using Floyd's algorithm
predecessor, distance = nx.floyd_warshall_predecessor_and_distance(G)

# Let's print the shortest path from node 'A' to 'C'
path = nx.reconstruct_path('A', 'C', predecessor)
print('Shortest path from A to C:', path)
print('Distance from A to C:', distance['A']['C'])
<|EOT|>
