A solver for the n-queens problem.