Graph Isomorphism - Merge sort