For the periodic isotropic Heisenberg model with arbitrary spins and inhomogeneities, we describe the system of algebraic equations whose solutions are in bijection with eigenvalues of the transfer-matrix. The system describes pairs of polynomials with the given discrete Wronskian (Casorati determinant) and additional divisibility conditions on discrete Wronskians with multiple steps. If the polynomial of the smaller degree in the pair is coprime with the Wronskian, this system turns into the standard Bethe ansatz equations. Moreover, if the transfer-matrix is diagonalizable, then its spectrum is necessarily simple modulo natural degeneration.