updated N Queens problem