Transformations of words in a semigroup presented by a system of defining relations