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

T = [[0 for i in range(N+1)] for j in range(N+1)]

for i in range(M):

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

    T[a][b] = 1

    T[b][a] = 1

ans = 0

def f(v,x,y):

    global N,M,T,a

    a[v] = 1

    for i in range(N+1):

        if (v==x and i==y) or (v==y and i==x):

            continue

        elif T[v][i]==0 or a[i]==1:

            continue

        f(i,x,y)

for i in range(1,N+1):

    for j in range(i,N+1):

        a = [0 for _ in range(N+1)]

        f(1,i,j)

        if sum(a)!=N:

            ans += 1

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

T = [[0]*N for i in range(N)]

G = []

for i in range(M):

    a,b = [int(x)-1 for x in input().split()]

    T[a][b] = 1

    T[b][a] = 1

    G.append((a,b))



def check(N,T):

    A = [0]*N

    Q = [0]

    while Q:

        q = Q.pop()

        if A[q]:continue

        A[q] = 1

        for c in range(N):

            if T[q][c]:

                Q.append(c)

    return sum(A)!=N



ans = 0

for g in G:

    a,b = g[0],g[1]

    T[a][b] = 0

    T[b][a] = 0

    if check(N,T):

        ans += 1

    T[a][b] = 1

    T[b][a] = 1

print(ans)
N, M = list(map(int, input().split()))
T = [[0 for i in range(N + 1)] for j in range(N + 1)]
for i in range(M):
    a, b = list(map(int, input().split()))
    T[a][b] = 1
    T[b][a] = 1
ans = 0


def f(v, x, y):
    global N, M, T, a
    a[v] = 1
    for i in range(N + 1):
        if (v == x and i == y) or (v == y and i == x):
            continue
        elif T[v][i] == 0 or a[i] == 1:
            continue
        f(i, x, y)


for i in range(1, N + 1):
    for j in range(i, N + 1):
        a = [0 for _ in range(N + 1)]
        f(1, i, j)
        if sum(a) != N:
            ans += 1
print(ans)

N, M = list(map(int, input().split()))
T = [[0] * N for i in range(N)]
G = []
for i in range(M):
    a, b = [int(x) - 1 for x in input().split()]
    T[a][b] = 1
    T[b][a] = 1
    G.append((a, b))


def check(N, T):
    A = [0] * N
    Q = [0]
    while Q:
        q = Q.pop()
        if A[q]:
            continue
        A[q] = 1
        for c in range(N):
            if T[q][c]:
                Q.append(c)
    return sum(A) != N


ans = 0
for g in G:
    a, b = g[0], g[1]
    T[a][b] = 0
    T[b][a] = 0
    if check(N, T):
        ans += 1
    T[a][b] = 1
    T[b][a] = 1
print(ans)

-T = [[0 for i in range(N + 1)] for j in range(N + 1)] +T = [[0] * N for i in range(N)] +G = [] -    a, b = list(map(int, input().split())) +    a, b = [int(x) - 1 for x in input().split()] -ans = 0 +    G.append((a, b)) -def f(v, x, y): -    global N, M, T, a -    a[v] = 1 -    for i in range(N + 1): -        if (v == x and i == y) or (v == y and i == x): +def check(N, T): +    A = [0] * N +    Q = [0] +    while Q: +        q = Q.pop() +        if A[q]: -        elif T[v][i] == 0 or a[i] == 1: -            continue -        f(i, x, y) +        A[q] = 1 +        for c in range(N): +            if T[q][c]: +                Q.append(c) +    return sum(A) != N -for i in range(1, N + 1): -    for j in range(i, N + 1): -        a = [0 for _ in range(N + 1)] -        f(1, i, j) -        if sum(a) != N: -            ans += 1 +ans = 0 +for g in G: +    a, b = g[0], g[1] +    T[a][b] = 0 +    T[b][a] = 0 +    if check(N, T): +        ans += 1 +    T[a][b] = 1 +    T[b][a] = 1