크루스칼 import sys input = sys.stdin.readline from heapq import heappop,heappush def find(x): if parent[x]==x: return x parent[x] = find(parent[x]) return parent[x] def union(a,b): a = find(a) b = find(b) if level[a] >= level[b]: parent[b] = a if level[a]==level[b]: level[a] += 1 else: parent[a] = b n, m = map(int, input().split()) parent = {i:i for i in range(1,n+1)} level = {i: 0 for i in range(1..