<｜begin▁of▁sentence｜>### Instruction:
Given a weighted directed graph with nodes 'A', 'B', and 'C', and edges with weights (A->B with weight 2, B->C with weight 1, and A->C with weight 5), what is the shortest path from 'A' to 'C'?
### Response:
import networkx as nx

# Create a weighted graph
G = nx.DiGraph()
G.add_edge('A', 'B', weight=2)
G.add_edge('B', 'C', weight=1)
G.add_edge('A', 'C', weight=5)

# Find the shortest path using Bellman-Ford algorithm
path = nx.bellman_ford_path(G, 'A', 'C', weight='weight')
print(path)
<|EOT|>
