My solution to the N queens problem