<p>The ordering of teams is decided by who received the most position-one votes. If two or more teams tie in the first position, we consider the second position to resolve the conflict, if they tie again, we continue this process until the ties are resolved. If two or more teams are still tied after considering all positions, we rank them alphabetically based on their team letter.</p>
<p>You are given an array of strings <code>votes</code> which is the votes of all voters in the ranking systems. Sort all teams according to the ranking system described above.</p>
X is the winner due to the tie-breaking rule. X has the same votes as W for the first position, but X has one vote in the second position, while W does not have any votes in the second position.
<li><code>votes[i].length == votes[j].length</code> for <code>0 <= i, j < votes.length</code>.</li>
<li><code>votes[i][j]</code> is an English <strong>uppercase</strong> letter.</li>
<li>All characters of <code>votes[i]</code> are unique.</li>
<li>All the characters that occur in <code>votes[0]</code><strong>also occur</strong> in <code>votes[j]</code> where <code>1 <= j < votes.length</code>.</li>