def max_bipartite_matching2(bigraph):
    """Bipartie maximum matching

    :param bigraph: adjacency list, index = vertex in U,
                                    value = neighbor list in V
    :comment: U and V can have different cardinalities
    :returns: matching list, match[v] == u iff (u, v) in matching
    :complexity: `O(|V|*|E|)`
    """
    nU = len(bigraph)
    # the following line works only in Python version ≥ 2.5
    # nV = max(max(adjlist, default=-1) for adjlist in bigraph) + 1
    nV = 0
    for adjlist in bigraph:
        for v in adjlist:
            if v + 1 > nV:
                nV = v + 1
    match = [None] * nV
    for u in range(nU):
        augment(u, bigraph, [False] * nV, match)
    return match