Aggregate child companies' accounts into the parent company

Hello,
i have a parent company called X with two child companies Z and Y
Money comes to the parent company through the child companies only
but expenses are paid from the parent company only
how can i manage my accounting activities so that total received or paid amounts are eventually transferred from child companies and recorded in the parent company?