Keep track of empty slots while assigning.