We establish a universal approach to solution of the word problem in the
varieties of di- and tri-algebras. This approach, for example, allows to apply
Groebner---Shirshov bases method for Lie algebras to solve the ideal membership
problem in free Leibniz algebras (Lie di-algebras). As another application, we
prove an analogue of the Poincare---Birkhoff---Witt Theorem for universal
enveloping associative tri-algebra of a Lie tri-algebra (CTD^!-algebra).Comment: 12 pages, to appear in Algebra Colloquiu