A variation of towers of hanoi