Triangular iteration in connectMtoM