Hamiltonian cycle with adjacency graph.
Hamiltonian cycle without matrix.