N Queens problem in Python