update for ural1982,Spanning tree,Prim