A set is a list of integers. In state A the head moves left over sets; at the left end, or when it deletes a star, it turns to state B and moves right. Moving right in B or C it decrements every set it passes, and a set holding a 0 loses it and switches the state between B and C. A star reached in B is deleted and the head turns left in state A; a star reached in C stays, and the next set gains or loses a 1.