output_description: Print the string S after lowercasing the K-th character in it.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
      S
attempt: N = int(input())
  weights = [input() for _ in range(N - 1)]
  weights = [x.split() for x in weights]
  weights = [list(map(int, x)) for x in weights]
  
  color = [1 for _ in range(N + 1)]
  color[1] = 0
  bi = []
  if N > 2:
      for i in range(1, N + 1):
          n1 = None
          n2 = None
          l1 = 0
          l2 = 0
          for x in weights:
              if x[0] == i:
                  if n1 == None:
                      n1 = x[1]
                      l1 = x[2]
                  else:
                      n2 = x[1]
                      l2 = x[2]
              if x[1] == i:
                  if n1 == None:
                      n1 = x[1]
                      l1 = x[2]
                  else:
                      n2 = x[1]
                      l2 = x[2]
          if n1 != None and n2 != None:
              bi.append([n1, n2, l1 + l2])
  w2 = weights + bi
  for _ in range(N):
      c = 0
      for x in w2:
          if x[2] % 2 == 0:
              if color[x[0]] == 0 and color[x[1]] == 1 and x[2] % 2 == 0:
                  color[x[1]] = color[x[0]]
                  c = 1
              if color[x[1]] == 0 and color[x[0]] == 1 and x[2] % 2 == 0:
                  color[x[0]] = color[x[1]]
                  c = 1
      if c == 0:
          break
  for x in color[1:]:
      print(x)
  
problem_description: Statement
  
  You are given a string S of length N consisting of `A`, `B` and `C`, and an
  integer K which is between 1 and N (inclusive). Print the string S after
  lowercasing the K-th character in it.
samples: [{"input": "3 1\n    ABC", "output": "aBC\n    \n\n* * *"}, {"input": "4 3\n    CABA", "output": "CAbA"}]