How to connect a beam to shell and a shell to a solid in FEM (Meshing)

How to connect a beam to a shell element in FEM and a shell to a solid? All the three differ in their dof's.