Make it work with any number of teams