<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [(0, 1), (1, 2), (2, 3)], how can you access the first row of its adjacency matrix and a specific element at row 1, column 2 using NetworkX?
### Response:
from networkx import DiGraph
from networkx.linalg.graphmatrix import adjacency_matrix

# Create a directed graph
edges = [(0, 1), (1, 2), (2, 3)]
g = DiGraph(edges)

# Get the adjacency matrix (as a SciPy sparse matrix)
adj_matrix = adjacency_matrix(g)

# Access elements of the matrix
# Get the first row
first_row = adj_matrix[0].toarray()
# Get a specific element (row 1, column 2)
element = adj_matrix[1, 2]

# Print the first row and the specific element
print('First row:', first_row)
print('Element at row 1, column 2:', element)
<|EOT|>
