from collections import defaultdict as dd

n,m = list(map(int, input().split()))

dic = dd(list)

l = []

cnt = 0

for _ in range(m):

  a,b = list(map(int, input().split()))

  l.append((a,b))

  dic[a].append(b)

  dic[b].append(a)

def con(x):

  visit.add(x)

  for i in dic[x]:

    if i in visit:

      continue

    con(i)

  return visit == set(range(1,n+1))

for x,y in l:

  dic[x].remove(y)

  dic[y].remove(x)

  visit = set()

  if not con(x):

    cnt += 1

  dic[x].append(y)

  dic[y].append(x)

print(cnt)
int1 = lambda x: int(x) - 1



N, M = list(map(int, input().split()))

G = [list() for _ in range(N)]

edges = [tuple(map(int1, input().split())) for _ in range(M)]

for u,v in edges:

    G[u].append(v)

    G[v].append(u)



pre = [-1]*N

low = [-1]*N



def detect_bridge(v, p=None, c=0):

    ret = list()

    pre[v] = low[v] = c

    c += 1

    for x in G[v]:

        if x == p: continue

        if pre[x] < 0:

            br, c = detect_bridge(x, v, c)

            ret.extend(br)

             

        if low[v] > low[x]: low[v] = low[x]

    if pre[v] == low[v] > 0:

        ret.append((p, v))

    return ret, c



bridges, _ = detect_bridge(0)

print((len(bridges)))
from collections import defaultdict as dd

n, m = list(map(int, input().split()))
dic = dd(list)
l = []
cnt = 0
for _ in range(m):
    a, b = list(map(int, input().split()))
    l.append((a, b))
    dic[a].append(b)
    dic[b].append(a)


def con(x):
    visit.add(x)
    for i in dic[x]:
        if i in visit:
            continue
        con(i)
    return visit == set(range(1, n + 1))


for x, y in l:
    dic[x].remove(y)
    dic[y].remove(x)
    visit = set()
    if not con(x):
        cnt += 1
    dic[x].append(y)
    dic[y].append(x)
print(cnt)

int1 = lambda x: int(x) - 1
N, M = list(map(int, input().split()))
G = [list() for _ in range(N)]
edges = [tuple(map(int1, input().split())) for _ in range(M)]
for u, v in edges:
    G[u].append(v)
    G[v].append(u)
pre = [-1] * N
low = [-1] * N


def detect_bridge(v, p=None, c=0):
    ret = list()
    pre[v] = low[v] = c
    c += 1
    for x in G[v]:
        if x == p:
            continue
        if pre[x] < 0:
            br, c = detect_bridge(x, v, c)
            ret.extend(br)
        if low[v] > low[x]:
            low[v] = low[x]
    if pre[v] == low[v] > 0:
        ret.append((p, v))
    return ret, c


bridges, _ = detect_bridge(0)
print((len(bridges)))

-from collections import defaultdict as dd - -n, m = list(map(int, input().split())) -dic = dd(list) -l = [] -cnt = 0 -for _ in range(m): -    a, b = list(map(int, input().split())) -    l.append((a, b)) -    dic[a].append(b) -    dic[b].append(a) +int1 = lambda x: int(x) - 1 +N, M = list(map(int, input().split())) +G = [list() for _ in range(N)] +edges = [tuple(map(int1, input().split())) for _ in range(M)] +for u, v in edges: +    G[u].append(v) +    G[v].append(u) +pre = [-1] * N +low = [-1] * N -def con(x): -    visit.add(x) -    for i in dic[x]: -        if i in visit: +def detect_bridge(v, p=None, c=0): +    ret = list() +    pre[v] = low[v] = c +    c += 1 +    for x in G[v]: +        if x == p: -        con(i) -    return visit == set(range(1, n + 1)) +        if pre[x] < 0: +            br, c = detect_bridge(x, v, c) +            ret.extend(br) +        if low[v] > low[x]: +            low[v] = low[x] +    if pre[v] == low[v] > 0: +        ret.append((p, v)) +    return ret, c -for x, y in l: -    dic[x].remove(y) -    dic[y].remove(x) -    visit = set() -    if not con(x): -        cnt += 1 -    dic[x].append(y) -    dic[y].append(x) -print(cnt) +bridges, _ = detect_bridge(0) +print((len(bridges)))