<｜begin▁of▁sentence｜>### Instruction:
Given an adjacency matrix capacities = [
    [0, 2, 0, 1],
    [2, 0, 3, 0],
    [0, 3, 0, 4],
    [1, 0, 4, 0]
], can you create an undirected graph using the 'max' mode with igraph's Graph.Adjacency function and list all its edges?
### Response:
import igraph as ig

# Adjacency matrix for the graph
capacities = [
    [0, 2, 0, 1],
    [2, 0, 3, 0],
    [0, 3, 0, 4],
    [1, 0, 4, 0]
]

# Create the graph from the adjacency matrix
g = ig.Graph.Adjacency(capacities, mode='max')

# Print the edges of the graph
print(g.get_edgelist())
<|EOT|>
