Question: Substitution sequence

Is there a Maple function that given a set of substitutions in form object=set of substitute objects produces a sequence of sets, each a product of substitution from the next, remove repetitions. An example:

 

#Substitutions
a = {b, c, d}, b = {a, b, e}, c = {a, d, f};
#Result
a = ({e, f}, {b, c, d}), b = ({f}, {c, d}, {a, b, e}), c = ({e}, {b}, {a, d, f});

Please Wait...