Find hamiltonian path