to solve the queens question.