Auto remove the overlapping area of curve and re-create a curve

Hi all,
I have a question.
I want to create a Grasshopper that can auto remove the overlapping area of curve and re-create a curve. as below image shown.

image

Is there any suggestion to edit the grasshopper ?

Thank all.

Please upload gh file

Hi Quan,

Please find the gh file. Thank you

0320.gh (6.6 KB)

0320 Edited v0.gh (22.1 KB)

Hi Quan,
Thank for the help. After testing, The gh can solve my question.