Relationship class, some work to TreeGenerator in the recursive function