Implemented replicateA.