How to concatenate multiple transformation matrices using convertwarp

Hello everyone, I have a question about how to concatenate multiple transformation matrices.
I have the following four transformation matrices, used to register image A to image D. A2B.mat is used to linearly register A to B, generated by flirt. B2C.nii.gz and B2C.mat are used to nonlinearly register B to C, generated by ANTs SyN. C2D.mat is used to linearly register C to D, generated by flirt. Can the convertwarp command can concatenate these transformation matrices into a single one? If so, how should I write this command? I’m a bit confused about the order of applying these transformation matrices. Thank you all!