Calculating the maximum of first ancestor of u and v
maxWei = max ( maxWei , max ( maxWeight [ v ] [ 0 ] , maxWeight [ u ] [ 0 ] ) ) ; NEW_LINE print ( str ( minWei ) + ' ▁ ' + str ( maxWei ) ) NEW_LINE