Class Assignments for NQueens Problem