Connect Lines

Hello!
Can someone help me to find a solution to connect all lines? see example below
Thanks a lot for your Help

you can try this:

image

image

thanks a lot