void Dfs2(NodeGroup g) { foreach (var n in g.Nodes) { foreach (var t in n.PointsTo) { if (t.Group != g) g.Connect (t.Group); } } }