Use a bunch of nested classes to represent the tree of data.