A python implementation of the nqueens problem