output_description: Print values C_X, C_Y and H representing the center coordinates and the height
  of the pyramid in one line, with spaces in between.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      x_1 y_1 h_1
      x_2 y_2 h_2
      x_3 y_3 h_3
      :
      x_N y_N h_N
attempt: import sys
  
  # height is H minus the taxicab distance from (Cx, Cy) to (x, y)
  
  
  def TaxicabDistance(pt_a, pt_b):
      return abs(pt_a[0] - pt_b[0]) + abs(pt_a[1] - pt_b[1])
  
  
  def RemoveLeft(some_set, x):
      return {el for el in some_set if el[0] >= x[0]}
  
  
  def RemoveRight(some_set, x):
      return {el for el in some_set if el[0] <= x[0]}
  
  
  def RemoveBelow(some_set, x):
      return {el for el in some_set if el[1] >= x[1]}
  
  
  def RemoveAbove(some_set, x):
      return {el for el in some_set if el[1] <= x[1]}
  
  
  def RemoveAllExcept(some_set, other_set):
      return some_set & other_set
  
  
  lines = sys.stdin.read().split("\n")
  N = int(lines[0])
  
  possible_c = set()
  for x in range(101):
      for y in range(101):
          possible_c.add((x, y))
  
  known_points = []
  
  for i in range(1, N + 1):
      np_text = lines[i].split(" ")
      new_point = (int(np_text[0]), int(np_text[1]), int(np_text[2]))
      for old_point in known_points:
          height_diff = new_point[2] - old_point[2]
          dist = TaxicabDistance(new_point, old_point)
  
          if dist == height_diff:
              # same quadrant, new_point closer to center
              if new_point[0] > old_point[0]:
                  possible_c = RemoveLeft(possible_c, new_point)
              elif new_point[0] < old_point[0]:
                  possible_c = RemoveRight(possible_c, new_point)
  
              if new_point[1] > old_point[1]:
                  possible_c = RemoveBelow(possible_c, new_point)
              elif new_point[1] < old_point[1]:
                  possible_c = RemoveAbove(possible_c, new_point)
          elif dist == -height_diff:
              # same quadrant, old_point closer to center
              if old_point[0] > new_point[0]:
                  possible_c = RemoveLeft(possible_c, old_point)
              elif old_point[0] < new_point[0]:
                  possible_c = RemoveRight(possible_c, old_point)
  
              if old_point[1] > new_point[1]:
                  possible_c = RemoveBelow(possible_c, old_point)
              elif old_point[1] < new_point[1]:
                  possible_c = RemoveAbove(possible_c, old_point)
          else:
              # different quadrants
              discrepancy = dist - abs(height_diff)
              # discrepancy is always even; the center has taxicab distance of
              # exactly discrepancy/2 measured from one (or both) of the points
              # and lies between the two
              candidates = set()
              c_dist = discrepancy // 2
              for j in range(c_dist + 1):
                  if new_point[0] == old_point[0]:
                      if new_point[1] > old_point[1]:
                          candidates.add((new_point[0] - j, new_point[1] - c_dist + j))
                          candidates.add((new_point[0] + j, new_point[1] - c_dist + j))
                          candidates.add((old_point[0] - j, old_point[1] + c_dist - j))
                          candidates.add((old_point[0] + j, old_point[1] + c_dist - j))
                      else:
                          candidates.add((new_point[0] - j, new_point[1] + c_dist - j))
                          candidates.add((new_point[0] + j, new_point[1] + c_dist - j))
                          candidates.add((old_point[0] - j, old_point[1] - c_dist + j))
                          candidates.add((old_point[0] + j, old_point[1] - c_dist + j))
                  if new_point[1] == old_point[1]:
                      if new_point[0] > old_point[0]:
                          candidates.add((new_point[0] - c_dist + j, new_point[1] + j))
                          candidates.add((new_point[0] - c_dist + j, new_point[1] - j))
                          candidates.add((old_point[0] + c_dist - j, old_point[1] + j))
                          candidates.add((old_point[0] + c_dist - j, old_point[1] - j))
                      else:
                          candidates.add((new_point[0] + c_dist - j, new_point[1] + j))
                          candidates.add((new_point[0] + c_dist - j, new_point[1] - j))
                          candidates.add((old_point[0] - c_dist + j, old_point[1] + j))
                          candidates.add((old_point[0] - c_dist + j, old_point[1] - j))
  
                  if new_point[0] > old_point[0]:
                      if new_point[1] > old_point[1]:
                          candidates.add((new_point[0] - j, new_point[1] - c_dist + j))
                          candidates.add((old_point[0] + j, old_point[1] + c_dist - j))
                      elif new_point[1] < old_point[1]:
                          candidates.add((new_point[0] - j, new_point[1] + c_dist - j))
                          candidates.add((old_point[0] + j, old_point[1] - c_dist + j))
                  if new_point[0] < old_point[0]:
                      if new_point[1] > old_point[1]:
                          candidates.add((new_point[0] + j, new_point[1] - c_dist + j))
                          candidates.add((old_point[0] - j, old_point[1] + c_dist - j))
                      elif new_point[1] < old_point[1]:
                          candidates.add((new_point[0] + j, new_point[1] + c_dist - j))
                          candidates.add((old_point[0] - j, old_point[1] - c_dist + j))
              # print("candidates for {", new_point, ',', old_point, "}:", candidates)
              possible_c &= candidates
  
          if len(possible_c) == 1:
              break
  
      known_points += [new_point]
  
  if len(possible_c) != 1:
      raise Exception(
          "no unique answer: " + str(len(possible_c)) + " possible c remaining"
      )
  
  (cx, cy) = possible_c.pop()
  h = known_points[0][2] + TaxicabDistance(known_points[0], (cx, cy))
  print(cx, cy, h)
  
problem_description: Statement
  
  In the Ancient Kingdom of Snuke, there was a pyramid to strengthen the
  authority of Takahashi, the president of AtCoder Inc.  
  The pyramid had _center coordinates_ (C_X, C_Y) and _height_ H. The altitude
  of coordinates (X, Y) is max(H - |X - C_X| - |Y - C_Y|, 0).
  
  Aoki, an explorer, conducted a survey to identify the center coordinates and
  height of this pyramid. As a result, he obtained the following information:
  
    * C_X, C_Y was integers between 0 and 100 (inclusive), and H was an integer not less than 1. 
    * Additionally, he obtained N pieces of information. The i-th of them is: "the altitude of point (x_i, y_i) is h_i." 
  
  This was enough to identify the center coordinates and the height of the
  pyramid. Find these values with the clues above.
samples: [{"input": "4\n    2 3 5\n    2 1 5\n    1 2 5\n    3 2 5", "output": "2 2 6\n    \n\nIn this case, the center coordinates and the height can be identified as (2,\n2) and 6.\n\n* * *"}, {"input": "2\n    0 0 100\n    1 1 98", "output": "0 0 100\n    \n\nIn this case, the center coordinates and the height can be identified as (0,\n0) and 100.  \nNote that C_X and C_Y are known to be integers between 0 and 100.\n\n* * *"}, {"input": "3\n    99 1 191\n    100 1 192\n    99 0 192", "output": "100 0 193\n    \n\nIn this case, the center coordinates and the height can be identified as (100,\n0) and 193."}]