Merge line

You have a list of lines and some of them are intersecting. How can I merge these intersecting lines?

Hi @Alisadeq try polycurve by joined curves