Find internal boundary of surfaces

Hello guy,
I have one problem I have 4 surface as below
Please help me to make the internal of boundary create from 4 edges inner of these surfaces or curves
Thank so much (19.0 KB)

…and added some flexibility to get more general solution…