Is there any way to use the styles in second word to overwrite the styles of first word

I am using the following codes to merge two documents into one:

Document main = new Document(path + "1.docx");
Document cover = new Document(path + "生产记录-横版签批(1).docx");
cover.appendDocument(main, ImportFormatMode.KEEP_SOURCE_FORMATTING);

but I found the output would use the first document "cover " styles, I want to the output would keep the styles of “main”.

Is there any way to meet my requirements ?
Thanks.

@GusGus You can clone the main document without children and then append both cover and main document to it using the destination styles:

Document main = new Document(path + "1.docx");
Document cover = new Document(path + "生产记录-横版签批(1).docx");
        
// Clone main document without children.
Document target = (Document)main.deepClone(false);
        
// Append cover and main document to target using destination styles.
target.appendDocument(cover, ImportFormatMode.USE_DESTINATION_STYLES);
target.appendDocument(main, ImportFormatMode.USE_DESTINATION_STYLES);
    
target.save(path + "out.docx");