Recursively generate group/parent objects