output_description: Print the number of the edges that are bridges among the M edges.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M  
      a_1 b_1  
      a_2 b_2
      :  
      a_M b_M
attempt: from collections import deque
  
  
  def BFS(N, M, List):
      Edge = [[] for TN in range(N + 1)]
      for TM in range(0, M):
          Edge[List[TM][0]].append(List[TM][1])
          Edge[List[TM][1]].append(List[TM][0])
  
      Distance = [-1] * (N + 1)
      Distance[0] = 0
      Distance[1] = 0
  
      From = [0] * (N + 1)
      From[1] = 1
  
      Deque = deque()
      Deque.append(1)
      while Deque:
          Now = Deque.popleft()
          for Con in Edge[Now]:
              if Distance[Con] == -1:
                  Distance[Con] = Distance[Now] + 1
                  Deque.append(Con)
                  From[Con] = Now
  
      return Distance[1:], From[1:]
  
  
  import copy
  
  N, M = (int(T) for T in input().split())
  List = [[] for TM in range(0, M)]
  for TM in range(0, M):
      List[TM] = [int(T) for T in input().split()]
  Count = 0
  for TM in range(0, M):
      ListCopy = copy.deepcopy(List)
      del ListCopy[TM]
      Distance, From = BFS(N, M - 1, ListCopy)
      if -1 in Distance:
          Count += 1
  print(Count)
  
problem_description: Statement
  
  You are given an undirected connected graph with N vertices and M edges that
  does not contain self-loops and double edges.  
  The i-th edge (1 \leq i \leq M) connects Vertex a_i and Vertex b_i.
  
  An edge whose removal disconnects the graph is called a _bridge_.  
  Find the number of the edges that are bridges among the M edges.
samples: [{"input": "7 7\n    1 3\n    2 7\n    3 4\n    4 5\n    4 6\n    5 6\n    6 7", "output": "4\n    \n\nThe figure below shows the given graph:\n\n![570677a9809fd7a5b63bff11e5d9bf79.png](https://img.atcoder.jp/abc075/570677a9809fd7a5b63bff11e5d9bf79.png)\n\nThe edges shown in red are bridges. There are four of them.\n\n* * *"}, {"input": "3 3\n    1 2\n    1 3\n    2 3", "output": "0\n    \n\nIt is possible that there is no bridge.\n\n* * *"}, {"input": "6 5\n    1 2\n    2 3\n    3 4\n    4 5\n    5 6", "output": "5\n    \n\nIt is possible that every edge is a bridge."}]