output_description: Print the string after the conversion.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      s
attempt: N, M = map(int, input().split())
  Islands = [[] for i in range(N)]
  Edge = []
  S = 0
  for i in range(M):
      a, b, c = map(int, input().split())
      Islands[a - 1].append([b - 1, c])
      Islands[b - 1].append([a - 1, c])
      Edge.append([a - 1, b - 1, c])
  for m in range(M):
      a = Edge[m][0]
      b = Edge[m][1]
      c_m = Edge[m][2]
      List = [[a, 0]]
      for l in List:
          c_base = l[-1]
          c = c_base
          if l[-2] == b:
              if c_m > c:
                  S += 1
                  break
          else:
              for n in Islands[l[-2]]:
                  if n[0] in l[0:-1]:
                      pass
                  else:
                      c += n[1]
                      List.append(l[0:-1] + [n[0], c])
                      c = c_base
  print(S - 1)
  
problem_description: Statement
  
  As a New Year's gift, Dolphin received a string s of length 19.  
  The string s has the following format: `[five lowercase English
  letters],[seven lowercase English letters],[five lowercase English letters]`.  
  Dolphin wants to convert the comma-separated string s into a space-separated
  string.  
  Write a program to perform the conversion for him.
samples: [{"input": "happy,newyear,enjoy", "output": "happy newyear enjoy\n    \n\nReplace all the commas in `happy,newyear,enjoy` with spaces to obtain `happy\nnewyear enjoy`.\n\n* * *"}, {"input": "haiku,atcoder,tasks", "output": "haiku atcoder tasks\n    \n\n* * *"}, {"input": "abcde,fghihgf,edcba", "output": "abcde fghihgf edcba"}]