An algorithm for winning coalitions in indirect control of corporations