Removing and reinserting elements to minimally mimic a changeset
Hint #1:


   Suppose you are only given the final configuration of the stack (not the changeset that led to it).  Could you find any sequence of moves that would lead to that configuration?  Could you find a sequence of moves that would lead to that configuration, and that makes at most one move per block?


Hint #2:


   Where does block 1 go to?  Where does block 2 go to?