Look what ur saying makes no sense... Madara and the 1st are really bright, u can't deny this, and I'm sure that when seeing who they're fighting they'll ally to get rid of him ( don't say that madara would never ally with the 1st...He never hated him, he was fighting the first so is clan would be renowned has the strongest, and he faught him in the valley of the end for the title of hokage! Madara even said that the person he admired the most was the 1st) .well you see madara hates the 1st so much that he will be focusing all of his powers against the first, but the first because of madara won't have time to try to go on an offense on rikidou because of madara, and then the first beats madara, but madara somehow manages to escape, but the first because he is worn out is no match for rikidou, and after the first is done, madara is a hollow shell of himself so either madara dies or runs away.
THEREFOR the winner is the sage of 6 paths U_U
Even with an alliance, I still think the sage of the 6 path would win...