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

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



def find(x):

    if par[x] == x:

        return x

    else:

        par[x] = find(par[x])

        return par[x]



def unite(x, y):

    x = find(x)

    y = find(y)

    if x == y:

        return

    

    if rank[x] < rank[y]:

        par[x] = y

    else:

        par[y] = x

        if rank[x] == rank[y]:

            rank[x] += 1



cnt = 0

for i in range(M):

    par = list(range(N + 1))

    rank = [0] * (N + 1)

    for j, (u, v) in enumerate(X):

        if i == j:

            continue

        unite(u, v)

    

    res = True

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

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

            res &= find(j) == find(k)



    cnt += int(not res)

        

print(cnt)

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

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



graph = [[False] * N for _ in range(N)]

for a, b in X:

    graph[a - 1][b - 1] = True

    graph[b - 1][a - 1] = True





def dfs(u):

    visited[u] = True

    for v in range(N):

        if visited[v] or not graph[u][v]:

            continue

        dfs(v)





res = 0

for i in range(M):

    a, b = X[i]

    a -= 1

    b -= 1

    

    graph[a][b] = False

    graph[b][a] = False

    

    visited = [False] * N

    dfs(0)

    res += int(not all(visited))

    

    graph[a][b] = True

    graph[b][a] = True

    

print(res)

N, M = list(map(int, input().split()))
X = [list(map(int, input().split())) for _ in range(M)]


def find(x):
    if par[x] == x:
        return x
    else:
        par[x] = find(par[x])
        return par[x]


def unite(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    if rank[x] < rank[y]:
        par[x] = y
    else:
        par[y] = x
        if rank[x] == rank[y]:
            rank[x] += 1


cnt = 0
for i in range(M):
    par = list(range(N + 1))
    rank = [0] * (N + 1)
    for j, (u, v) in enumerate(X):
        if i == j:
            continue
        unite(u, v)
    res = True
    for j in range(1, N + 1):
        for k in range(1, N + 1):
            res &= find(j) == find(k)
    cnt += int(not res)
print(cnt)

N, M = list(map(int, input().split()))
X = [list(map(int, input().split())) for _ in range(M)]
graph = [[False] * N for _ in range(N)]
for a, b in X:
    graph[a - 1][b - 1] = True
    graph[b - 1][a - 1] = True


def dfs(u):
    visited[u] = True
    for v in range(N):
        if visited[v] or not graph[u][v]:
            continue
        dfs(v)


res = 0
for i in range(M):
    a, b = X[i]
    a -= 1
    b -= 1
    graph[a][b] = False
    graph[b][a] = False
    visited = [False] * N
    dfs(0)
    res += int(not all(visited))
    graph[a][b] = True
    graph[b][a] = True
print(res)

+graph = [[False] * N for _ in range(N)] +for a, b in X: +    graph[a - 1][b - 1] = True +    graph[b - 1][a - 1] = True -def find(x): -    if par[x] == x: -        return x -    else: -        par[x] = find(par[x]) -        return par[x] +def dfs(u): +    visited[u] = True +    for v in range(N): +        if visited[v] or not graph[u][v]: +            continue +        dfs(v) -def unite(x, y): -    x = find(x) -    y = find(y) -    if x == y: -        return -    if rank[x] < rank[y]: -        par[x] = y -    else: -        par[y] = x -        if rank[x] == rank[y]: -            rank[x] += 1 - - -cnt = 0 +res = 0 -    par = list(range(N + 1)) -    rank = [0] * (N + 1) -    for j, (u, v) in enumerate(X): -        if i == j: -            continue -        unite(u, v) -    res = True -    for j in range(1, N + 1): -        for k in range(1, N + 1): -            res &= find(j) == find(k) -    cnt += int(not res) -print(cnt) +    a, b = X[i] +    a -= 1 +    b -= 1 +    graph[a][b] = False +    graph[b][a] = False +    visited = [False] * N +    dfs(0) +    res += int(not all(visited)) +    graph[a][b] = True +    graph[b][a] = True +print(res)