Tools for solving the N Queens problem