<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges (0, 1), (1, 2), (2, 3), (3, 4), can you produce and print the string representation of the adjacency matrix using the __str__ function in a manner analogous to how the undocumented Matrix.Matrix.__str__ method may work?
### Response:
import networkx as nx

# Create a graph
G = nx.DiGraph()

# Add edges to the graph (each tuple represents an edge)
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4)])

# Create an adjacency matrix and use its string representation
A = nx.adjacency_matrix(G)
matrix_str = A.__str__()

# Print the string representation of the adjacency matrix
print(matrix_str)
<|EOT|>
