Write for an adjacency list.