Well, it looks like I didn't leave the oil cap off my car after all: most likely explanation is that engine pressure blew it off in transit. I feel better about that.

Two simple terms are introduced with today's puzzle.

PERMUTATIONS AND STACKS.

I need to introduce two terms here. The first is that of a "permutation" which is simply a re-ordering.

For example, there is only a single permutation of the number 1, but there are two permutations of the numbers 1..2, namely "1,2" and "2,1". There are more permutations of the numbers 1..3. Some of these are "1,2,3", "1,3,2", "3,2,1"....

The second term I wish to introduce is the notion of a "stack" of numbers, sometimes called a "LIFO" stack (for last-in, first-out). A stack is just a list (it's easier to see why it's called a stack if you imagine the numbers arranged vertically) which you can do two things with: you can "push" a number onto the top of the stack, and you can "pop" a number off the top of the stack.

Starting with the stack 3,2 Pushing 1 onto it gives 1,3,2 Pushing 4 onto it gives 4,1,3,2 Popping 4 off it leaves 1,3,2 Popping 1 off it leaves 3,2
3
2
1
3
2
4
1
3
2
1
3
2
3
2

Problems:

OK, the scenario is this: supposing you've got three stacks. The first stack has the numbers 1, 2, 3 on it in order from top-to-bottom (ie, the first number you can pop off the stack is 1, then 2, then 3). The second and third stacks are empty.

You're allowed two kinds of moves. You can either pop a number off the first stack and push it onto the second stack, or pop a number off the second stack and push it onto the third stack. "Backwards" moves are not allowed. You have to move all the numbers from the first stack to the third.