Add N Queens problem iterative counting