In reply to Richard.

By associativity, tr(A*B*C) = sum( (A*B)#C` )