<｜begin▁of▁sentence｜>### Instruction:
Imagine you're tasked with developing a training schedule for pairs of athletes, where each pair's compatibility is represented by their potential as a team. We have an array of dynamic duos along with their synergy scores: [(1, 2, 6), (1, 3, 2), (2, 3, 1), (2, 4, 7), (3, 5, 9), (4, 5, 3)]. To maximize the performance outcome, you're looking to assign the pairs so that the total score of combined training potential is at its peak across the group. How would you strategically pair up these athletes to achieve the most advantageous training plan using NetworkX, analogous to finding a maximum-weighted matching in a graph?
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()

# Add weighted edges
edges = [(1, 2, 6), (1, 3, 2), (2, 3, 1), (2, 4, 7), (3, 5, 9), (4, 5, 3)]
G.add_weighted_edges_from(edges)

# Compute a maximum-weighted matching of the graph
matching = nx.max_weight_matching(G, maxcardinality=False, weight='weight')

# Print the sorted matching
print(sorted(matching))
<|EOT|>
