I have a (long) sum of the following ** (noncommutative) products:
(each variable always consists of two letters like in the artificial example above and the 'length' of the product varies) and I would like to tranform it into the following ordinary multiplication:
ipgq ipsr ipgh
where ipxy is a variable created by merging 'ip' with the symbols surrounding each ** (in this case gq and sr) and the last one created from the outermost two symbols (gh). The order of xy's matters but the product order of ipxy's does not since it is the usual multiplication.