N Queens Problem Python Code