Joining nested families

Hello everyone,

I am quite new to Dynamo Revit, and currently looking for a method to join nested families via Dynamo. As shown in the picture below, I’d like to join element 1 and 2, element 3 and 4, and element 5 and 6.

I know the existence of node ‘Element.JoinGeometry’, but I think my list should be used in another way. Is there someone that has got a solution?

Thanks in advance!