Clone an undirected graph