public List<Edge> prim(int node) {
			w[node]=0;
			p[node]=node;
			Heap h=new Heap(w);
			List<Edge> rel=new ArrayList<>();
			for (int i=0;i<p.length;++i) {
				int j=h.poll();

				Node t=m2.get(j);
				for (Edge e: t.edge) {
					Node a=e.a;
					Node b=e.b;
					Node other =t==a?b:a;
					int k=m1.get(other);
					if (w[k]>e.w) {
						w[k]=e.w;
						h.ascent(k, w[k]);
						p[k]=j;
					}
					if (p[j]!=j) {
						int l=m1.get(other);
						if (p[j]==l) {
							rel.add(e);
						}
					}
				}
			}
			return rel;
		}