Implement a version stack simulating a tree like structure.