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

L = [[0, 0] for _ in range(m)]

g = [[] for _ in range(n)]

for j in range(m):

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

    a, b = a-1, b-1

    L[j][0] = a

    L[j][1] = b



from collections import deque



ans = 0

for i in range(m):

    g = [[] for _ in range(n)]

    for j in range(m):

        if j == i:

            continue

        a = L[j][0]

        b = L[j][1]

        g[a].append(b)

        g[b].append(a)

    #print(g)

    s = deque()

    s.append(0)

    visit = [-1]*n

    visit[0] = 0

    while s:

        x = s.pop()

        for new_x in g[x]:

            if visit[new_x] == -1:

                visit[new_x] = visit[x] + 1

                s.append(new_x)

    if min(visit) == -1:

        ans += 1

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

g = [[] for _ in range(n)]

for i in range(m):

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

    a, b = a-1, b-1

    g[a].append(b)

    g[b].append(a)



def lowlink(g, root=0):

    n = len(g)

    order = [n]*n

    low = [n]*n



    s = [root]

    cnt = 1

    par = [-1]*n

    seq = []

    while s:

        v = s.pop()

        if order[v] != n:

            continue

        order[v] = cnt

        seq.append(v)

        low[v] = cnt

        cnt += 1

        for u in g[v]:

            if order[u] < cnt:

                if par[v] != u:

                    low[v] = min(low[v], order[u])

                    continue

            else:

                par[u] = v

                s.append(u)

    child = [[] for _ in range(n)]

    for v in range(n):

        if par[v] != -1:

            child[par[v]].append(v)

    seq.reverse()

    for v in seq:

        for u in child[v]:

            low[v] = min(low[v], low[u])

    # bridge

    bridge = []

    for p in range(n):

        for c in child[p]:

            if order[p] < low[c]:

                bridge.append((p, c))



    # articulation points

    AP = []

    for v in range(n):

        if v == root:

            if len(child[v]) >= 2:

                AP.append(v)

        else:

            for c in child[v]:

                if order[v] <= low[c]:

                    AP.append(v)

                    break

    return AP, bridge



_, bridge = lowlink(g, 0)

print((len(bridge)))
n, m = list(map(int, input().split()))
L = [[0, 0] for _ in range(m)]
g = [[] for _ in range(n)]
for j in range(m):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    L[j][0] = a
    L[j][1] = b
from collections import deque

ans = 0
for i in range(m):
    g = [[] for _ in range(n)]
    for j in range(m):
        if j == i:
            continue
        a = L[j][0]
        b = L[j][1]
        g[a].append(b)
        g[b].append(a)
    # print(g)
    s = deque()
    s.append(0)
    visit = [-1] * n
    visit[0] = 0
    while s:
        x = s.pop()
        for new_x in g[x]:
            if visit[new_x] == -1:
                visit[new_x] = visit[x] + 1
                s.append(new_x)
    if min(visit) == -1:
        ans += 1
print(ans)

n, m = list(map(int, input().split()))
g = [[] for _ in range(n)]
for i in range(m):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    g[a].append(b)
    g[b].append(a)


def lowlink(g, root=0):
    n = len(g)
    order = [n] * n
    low = [n] * n
    s = [root]
    cnt = 1
    par = [-1] * n
    seq = []
    while s:
        v = s.pop()
        if order[v] != n:
            continue
        order[v] = cnt
        seq.append(v)
        low[v] = cnt
        cnt += 1
        for u in g[v]:
            if order[u] < cnt:
                if par[v] != u:
                    low[v] = min(low[v], order[u])
                    continue
            else:
                par[u] = v
                s.append(u)
    child = [[] for _ in range(n)]
    for v in range(n):
        if par[v] != -1:
            child[par[v]].append(v)
    seq.reverse()
    for v in seq:
        for u in child[v]:
            low[v] = min(low[v], low[u])
    # bridge
    bridge = []
    for p in range(n):
        for c in child[p]:
            if order[p] < low[c]:
                bridge.append((p, c))
    # articulation points
    AP = []
    for v in range(n):
        if v == root:
            if len(child[v]) >= 2:
                AP.append(v)
        else:
            for c in child[v]:
                if order[v] <= low[c]:
                    AP.append(v)
                    break
    return AP, bridge


_, bridge = lowlink(g, 0)
print((len(bridge)))

-L = [[0, 0] for _ in range(m)] -for j in range(m): +for i in range(m): -    L[j][0] = a -    L[j][1] = b -from collections import deque +    g[a].append(b) +    g[b].append(a) -ans = 0 -for i in range(m): -    g = [[] for _ in range(n)] -    for j in range(m): -        if j == i: + +def lowlink(g, root=0): +    n = len(g) +    order = [n] * n +    low = [n] * n +    s = [root] +    cnt = 1 +    par = [-1] * n +    seq = [] +    while s: +        v = s.pop() +        if order[v] != n: -        a = L[j][0] -        b = L[j][1] -        g[a].append(b) -        g[b].append(a) -    # print(g) -    s = deque() -    s.append(0) -    visit = [-1] * n -    visit[0] = 0 -    while s: -        x = s.pop() -        for new_x in g[x]: -            if visit[new_x] == -1: -                visit[new_x] = visit[x] + 1 -                s.append(new_x) -    if min(visit) == -1: -        ans += 1 -print(ans) +        order[v] = cnt +        seq.append(v) +        low[v] = cnt +        cnt += 1 +        for u in g[v]: +            if order[u] < cnt: +                if par[v] != u: +                    low[v] = min(low[v], order[u]) +                    continue +            else: +                par[u] = v +                s.append(u) +    child = [[] for _ in range(n)] +    for v in range(n): +        if par[v] != -1: +            child[par[v]].append(v) +    seq.reverse() +    for v in seq: +        for u in child[v]: +            low[v] = min(low[v], low[u]) +    # bridge +    bridge = [] +    for p in range(n): +        for c in child[p]: +            if order[p] < low[c]: +                bridge.append((p, c)) +    # articulation points +    AP = [] +    for v in range(n): +        if v == root: +            if len(child[v]) >= 2: +                AP.append(v) +        else: +            for c in child[v]: +                if order[v] <= low[c]: +                    AP.append(v) +                    break +    return AP, bridge + + +_, bridge = lowlink(g, 0) +print((len(bridge)))