So here is my team:
Hidan, can't be killed by stabs, flames, etc.. Can kill obito the moment he obtains his blood.
Minato, his first job is to get rid of the tailed beasts, just move them as far away as possible, but in distance so he can return to the fight at once, thus buying some time. Then he has to obtain Obitos blood for Hidan.
Shikamaru, he is to support Minato in landing a blow on Obito thus obtaining his blood.
Hashirama, his main job is to fight Edo Madara. Later he will have to suppress the tailed beasts.
Sarutobi Hiruzen, his main job is to support Hashirama, he will not participate in direct combat when Madara goes perf susano though, however, he will use the demon seal to seal Madara when it is possible.
Assumption, Minato and Shikamaru are geniuses, thus they can obtain obitos blood within the time period it should take for the tailed beasts to return to the battle. Shikamaru will foresee Obitos moves for Minato, and thus he will end up catching him, and minato gets his blood. Should he use ghedo mazo, hiruzen will leave his battle to help them.
Hashirama and Hiruzen can keep Madara at bay for a while, Hashi alone is actually enough till his chakra runs out, but we know he has vast amounts of it. They must, however, end up sealing Madara before the tailed beasts return.
I anticipate that Minato hidan and shikamaru are done fast, so they can assist in getting Madara. Should the tailed beast return before this, they will deal with them somehow so they can't interfere. Possibly by using Hidan as decoy.
In the end Hashirama is the most crucial to stop the tailed beasts. But he has done it before..