output_description: Print the number of times Takahashi will hear his favorite sound.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B C
attempt: # D - Decayed Bridges
  from collections import deque
  
  N, M = map(int, input().split())
  
  graph = [[] for _ in range(N)]
  AB = deque()
  for i in range(M):
      a, b = map(int, input().split())
      a -= 1
      b -= 1
      AB.append([a, b])
      graph[a].append(b)
      graph[b].append(a)
  
  
  def isDivided(a, b, graph):
      d = deque()
      d.append(a)
      done = [0] * N
      while len(d) > 0:
          now = d.popleft()
          done[now] = 1
          for i in graph[now]:
              if i == b:
                  return 0
              elif done[i] == 0:
                  d.append(i)
      return sum(done)
  
  
  ans = 0
  for i in range(M):
      a, b = AB.popleft()
      graph[a].remove(b)
      graph[b].remove(a)
      tmpa = isDivided(a, b, graph)
      tmpb = isDivided(b, a, graph)
      if tmpa != 0:
          ans += tmpa * tmpb
          print(ans)
      else:
          print(ans)
  
problem_description: Statement
  
  Takahashi likes the sound when he buys a drink from a vending machine.
  
  That sound can be heard by spending A yen (the currency of Japan) each time.
  
  Takahashi has B yen. He will hear the sound as many times as he can with that
  money, but at most C times, as he would be satisfied at that time.
  
  How many times will he hear the sound?
samples: [{"input": "2 11 4", "output": "4\n    \n\nSince he has not less than 8 yen, he will hear the sound four times and be\nsatisfied.\n\n* * *"}, {"input": "3 9 5", "output": "3\n    \n\nHe may not be able to be satisfied.\n\n* * *"}, {"input": "100 1 10", "output": "0"}]