An implementation of Hamiltonian circuits and such