Heterogeneous sexual mixing in populations with arbitrarily connected multiple groups.