output_description: If a is not less than 3200, print s; if a is less than 3200, print `red`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a
      s
attempt: import sys
  from collections import deque
  
  sys.setrecursionlimit(500000)
  input = sys.stdin.readline
  n, q = map(int, input().split())
  edge = [[] for i in range(n)]
  cost = [0] * n
  for i in range(n - 1):
      p, s = map(int, input().split())
      p -= 1
      s -= 1
      edge[p].append(s)
      edge[s].append(p)
  for i in range(q):
      x, c = map(int, input().split())
      x -= 1
      cost[x] += c
  visited = [False] * n
  queue = deque([0])
  visited[0] = True
  while len(queue) != 0:
      a = queue.popleft()
      for i in edge[a]:
          if visited[i] == True:
              continue
          queue.append(i)
          visited[i] = True
          cost[i] += cost[a]
  for i in range(n):
      cost[i] = str(cost[i])
  print(" ".join(cost))
  
problem_description: Statement
  
  You will be given an integer a and a string s consisting of lowercase English
  letters as input.
  
  Write a program that prints s if a is not less than 3200 and prints `red` if a
  is less than 3200.
samples: [{"input": "3200\n    pink", "output": "pink\n    \n\na = 3200 is not less than 3200, so we print s = `pink`.\n\n* * *"}, {"input": "3199\n    pink", "output": "red\n    \n\na = 3199 is less than 3200, so we print `red`.\n\n* * *"}, {"input": "4049\n    red", "output": "red\n    \n\na = 4049 is not less than 3200, so we print s = `red`."}]