<｜begin▁of▁sentence｜>### Instruction:
As a swim instructor, you may need to organize a swim meet with multiple categories of swimmers for a local swimming club. You want to use a hierarchical clustering approach to group swimmers based on their skill levels and techniques. The competition will have different levels, and you want to divide the swimmers into two clusters based on their performance at level 2. How do you use the Dendrogram object to create these clusters and ensure a fair and competitive environment for all participants?
### Response:
import igraph as ig

# Construct a graph
edges = [(0, 1), (0, 2), (1, 3), (1, 4), (2, 5), (2, 6)]
graph = ig.Graph(edges=edges)

# Perform hierarchical clustering (Agglomerative)
dendrogram = graph.community_edge_betweenness()

# Create Dendrogram object from merge history
merges = dendrogram.merges
d = ig.Dendrogram(graph, merges=merges)

# Cut the dendrogram at level 2 to get two clusters
clusters = d.as_clustering(2)
print(clusters)
<|EOT|>
