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: def c_bridge(N, M, Edges):
      def dfs(v):
          is_visited[v] = True  # 現在の頂点を訪問済にする
          for v2 in range(N):
              if not graph[v][v2] or is_visited[v2]:
                  continue  # 頂点v2に行けないか、行く必要がない
              dfs(v2)
  
      graph = [[False for _ in range(N)] for _ in range(N)]
      for a, b in Edges:
          graph[a - 1][b - 1] = True
          graph[b - 1][a - 1] = True
  
      # 各辺は橋か？ グラフからその辺を取り除いて、グラフが連結かを判定
      ans = 0
      for a, b in Edges:
          # 辺を取り除く
          graph[a - 1][b - 1] = False
          graph[b - 1][a - 1] = False
  
          # すべての辺を未訪問として初期化
          is_visited = [False for _ in range(N)]
          # 全頂点に到達できなければ、除いた辺は橋である
          dfs(0)
          ans += 1 if not all(is_visited) else 0
  
          # 辺を復元
          graph[a - 1][b - 1] = True
          graph[b - 1][a - 1] = True
      return ans
  
  
  N, M = [int(i) for i in input().split()]
  Edges = [[int(i) for i in input().split()] for j in range(M)]
  print(c_bridge(N, M, Edges))
  
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."}]