def build_ranking(teams):
    """
    Assigns rankings to the teams based on their winrates. If teams are tied,
    they will be assigned the same ranking as each other.

    :param teams: A list of teams, where each element is a list containing a team's name
        and winrate (among potentially other data). This list is already sorted by num wins in descending order.
    :type teams: list

    :return: List of teams with their rank, name, and number of wins, in ascending order of rank.

    """
    out = []
    prev_wins = float("inf")
    curr_rank = -1
    cnt = 0
    for name, wins, *_ in teams:
        cnt += 1
        if wins < prev_wins:
            curr_rank += cnt
            prev_wins = wins
            cnt = 0
        out.append([curr_rank, name, wins])
    return out