output_description: Print the number of days before the next Sunday.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: n = int(input())
  s = [{0} for i in range(n)]
  
  ans = [0] * n
  a = 0
  b = 0
  sp = {i for i in range(n)}
  for i in range(1, n):
      a, b = list(map(int, input().split()))
      ans[i] = min(sp - (s[a - 1] | s[b - 1]))
  
      s[a - 1].add(ans[i])
      s[b - 1].add(ans[i])
  
  print(max(ans))
  for i in range(1, n):
      print(ans[i])
  
problem_description: Statement
  
  Given is a string S representing the day of the week today.
  
  S is `SUN`, `MON`, `TUE`, `WED`, `THU`, `FRI`, or `SAT`, for Sunday, Monday,
  Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.
  
  After how many days is the next Sunday (tomorrow or later)?
samples: [{"input": "SAT", "output": "1\n    \n\nIt is Saturday today, and tomorrow will be Sunday.\n\n* * *"}, {"input": "SUN", "output": "7\n    \n\nIt is Sunday today, and seven days later, it will be Sunday again."}]