REG- Consolidated Returns

In terms of a consolidated return, can someone give insight into: (1) how capital losses of one corporate offset capital gains in another corporation and (2) how operating losses of one corporation offset operating profits of another corporation? I understand the concept but I can't find anything in terms of how to allocate if you have more than two corporations consolidating returns. (i.e. two corporations have gains/profit and one has loss --- how to determine which gets to benefit) Thanks!!