Split Towers of Hanoi

Given one interleaved stack (e.g. resulting from the previous exercise), you should build two separate stacks. In other words, your code should revert the operations done to solve the previous exercise.

You will need an extra function that can move an interleaved stack of n pairs of disks, without changing the relative positions of disks of the same size.

If your initial situation is as follows:

then you have the following situation right before the main recursive call: