<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph with 4 vertices and edges [(0, 1), (1, 2), (2, 3), (3, 0)] connected in a cycle, and with edge capacities [10, 8, 5, 8] respectively, can you calculate the Gomory-Hu tree to represent the value of all maximum flows or minimum cuts between vertex pairs? Use the 'capacity' as the edge capacities and store the flow values in the resulting graph. Print out the edges of the Gomory-Hu tree with their flow values, and plot the tree.
### Response:
import igraph as ig

# Create an undirected graph with edge capacities.
g = ig.Graph(edges=[(0, 1), (1, 2), (2, 3), (3, 0)], directed=False)
g.es['capacity'] = [10, 8, 5, 8]

# Calculate the Gomory-Hu tree of the graph.
gomory_hu = g.gomory_hu_tree(capacity='capacity')

# Print the edges and their corresponding flow values.
for edge in gomory_hu.es:
    print('Edge (%d, %d) has a flow value of %d' % (edge.source, edge.target, edge['flow']))

# Plot the Gomory-Hu tree.
ig.plot(gomory_hu)
<|EOT|>
