From adjacency matrix to the list of edges - 2 (#473) - Azerbaijan Computing Olympiad