What UreDe4D said is a good idea, using player groups.
I'll explain it to you a bit more.
1) Create a PlayerGroup Variable with an array. (I named it Alliance.)
Inside Alliance we have: Players 1 to 9.
Inside Alliance we have: Player 10.
I want you to add these to their groups first and make them treath each other allies and enemies. (Look at the trigger below.)
Now you want to put people in Alliance to Alliance when a unit fo them dies right?
If so then add this trigger aswell.
This should do the trick, also I used a Boolean Condition to check if the owner was inside Alliance