Simpler adjacency list gathering (and with less risk time complexity-wise).