solve the N-queens II problem.