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: class UnionFind:
    
      def __init__(self,n):
          #par[x]==xならxというノードが根。xに親がいない
          self.par = [i for i in range(n+1)]
          self.rank = [0]*(n+1) 
      
      def find(self,x): #xの根を検索
          #xが根ならxを返す
          if self.par[x] == x:
              return x
          else:
  			self.par[x] = self.find(self.par[x]) #パス圧縮
              return self.par[x]
  
      def unite(self,x,y):
          #根を探す
          x = self.find(x)
          y = self.find(y)        
          #木の深さを比較し、小さい方を大きい方につなげる
          if self.rank[x] < self.rank[y]:
              self.par[x] = y
          else:
              self.par[y] = x
              if self.rank[x] == self.rank[y]:
                  self.rank[x] += 1 #rankが同じ木を繋げたとき根のランクを一つ上げる
      
      def same_check(self,x,y): #xとyが同じ集合に属しているか
          return self.find(x) == self.find(y)
  
  n, m = map(int,input().split())
  
  A=[list(map(int,input().split())) for i in range(m)]
  ans = 0
  for i in range(m):
      uf = UnionFind(n) #
      for j in range(m):
          if i != j: #
              uf.unite(A[j][0],A[j][1])
      f = 1
      g = uf.find(1) #
      for j in range(1,n+1):
          if g != uf.find(j): #1~n(iを除く)がすべて同じ集合に属しているか
              f = 0
              break
      if not f:
          ans += 1
  print(ans)
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."}]