Sorting teams order based on side. This helps to get next teams turn
based on available teams and sides