def get_the_trees(DTA):
    """ Get the bracket trees from the list of (winner, score, loser, score) tuples """
    losers = set()
    winner_tree = {}
    loser_tree = {}
    for team1, score1, team2, score2 in DTA:
        tree = loser_tree if team1 in losers else winner_tree
        losers.add(team2)
        h = tree.get(team1, [])
        h.append( (team1, score1, team2, score2) )
        tree[team1] = h
    return winner_tree, loser_tree