update for spoj3978,lca tarjan the max and min edge on the query(a,b) path