This is easily done in a two pass solution - create a summary, which lists the main company and the subsidiaries:
S035 - S036
S035 - S037
S035 - S038
S041 - S042
S041 - S043[/Code]
Export this to an Access table or Excel worksheet.
Then in your main model, make and external lookup to this table and join on the Subsidiary key to import the relevant Main key field.