from scipy.sparse import *

N,M,*A=list(map(int,open(0).read().split()));g=csr_matrix(([1]*M,(A[::2],A[1::2])),shape=(N+1,N+1)).tolil()

c = 0



for a,b in zip(*g.nonzero()):

  g[a,b]=0

  n,_=csgraph.connected_components(g)

  c+=n!=2

  g[a,b]=1



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

edges=[list(map(int,input().split())) for i in range(M)]

ans=0

for x in edges:

    l=list(range(N))

    for y in edges:

        if y!=x:l=[l[y[0]-1] if l[i]==l[y[1]-1] else l[i] for i in range(N)]

    if len(set(l))!=1:ans+=1

print(ans)
from scipy.sparse import *

N, M, *A = list(map(int, open(0).read().split()))
g = csr_matrix(([1] * M, (A[::2], A[1::2])), shape=(N + 1, N + 1)).tolil()
c = 0
for a, b in zip(*g.nonzero()):
    g[a, b] = 0
    n, _ = csgraph.connected_components(g)
    c += n != 2
    g[a, b] = 1
print(c)

N, M = list(map(int, input().split()))
edges = [list(map(int, input().split())) for i in range(M)]
ans = 0
for x in edges:
    l = list(range(N))
    for y in edges:
        if y != x:
            l = [l[y[0] - 1] if l[i] == l[y[1] - 1] else l[i] for i in range(N)]
    if len(set(l)) != 1:
        ans += 1
print(ans)

-from scipy.sparse import * - -N, M, *A = list(map(int, open(0).read().split())) -g = csr_matrix(([1] * M, (A[::2], A[1::2])), shape=(N + 1, N + 1)).tolil() -c = 0 -for a, b in zip(*g.nonzero()): -    g[a, b] = 0 -    n, _ = csgraph.connected_components(g) -    c += n != 2 -    g[a, b] = 1 -print(c) +N, M = list(map(int, input().split())) +edges = [list(map(int, input().split())) for i in range(M)] +ans = 0 +for x in edges: +    l = list(range(N)) +    for y in edges: +        if y != x: +            l = [l[y[0] - 1] if l[i] == l[y[1] - 1] else l[i] for i in range(N)] +    if len(set(l)) != 1: +        ans += 1 +print(ans)