from collections import deque, Counter from sys import stdin, stdout readline = stdin.readline inputs = lambda: map(int, readline().split()) n, m = inputs() n1 = n+1 ct = Counter() parent = [1] + range(1,n1) count = [1]*n1 def root(x): p = parent[x] if x!=p: parent[x] = x = root(p) return x for i in xrange(m): u, v = inputs() a = root(u); b = root(v) if a!=b: if a