Travesting the cells in Z algorithm