Three steps:
(1) ∣E(G)∣=∣E(H)∣: by considering i=j∑∣E(G−{i}−{j})∣=C2n−2∣E(G)∣.
(2) degG(i)=degH(i) for all i: fix some i0, consider j=i0∑∣E(G−{j}−{i0})∣=(n−3)(∣E(G)∣−degG(x0)).
(3) Define the function adjG(i,j)=1 if i and j are connected by an edge, adjG(i,j)=0 if i and j are not connected by an edge. It is clear that, ∣E(G)∣−∣E(G−{i}−{j})∣=degG(i)+degG(j)−adjG(i,j),which leads to adjG(i,j)=adjH(i,j) for all i,j.