Tenon and mortise in Rhino or Grasshopper

I’m totally newbie
want to add mortise and tenon that the final shape
which is the union of the four parts

can be easily constructed, is there a component in grasshoppper
that can do this ?
I’m not obessed with mortise and tenon,
if someone has another solution ? :face_with_peeking_eye: :wink:
Thank you