Figured out how to do arbitrary combinations for trees.

My method, unfortunately, requires trees to be mutable.