Circular queue

Picture six slots in a ring. One marker shows where to take a number, and the other shows where to put the next one.

After the last slot, a marker moves back to the first. The first number to join the queue is the first to leave.