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: # -*- coding: utf-8 -*-
  import sys
  import math
  from bisect import bisect_left
  from bisect import bisect_right
  import collections
  import copy
  import heapq
  from collections import defaultdict
  from heapq import heappop, heappush
  import itertools
  
  input = sys.stdin.readline
  
  ##### リストの 二分木検索 #####
  # bisect_left(lists, 3)
  # bisect_right(lists, 3)
  
  ##### プライオリティキュー #####
  # heapq.heapify(a) #リストaのheap化
  # heapq.heappush(a,x) #heap化されたリストaに要素xを追加
  # heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力
  
  # heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
  # heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと
  
  ##### タプルリストのソート #####
  # sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
  # sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
  # sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
  # sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順
  
  # sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
  # sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順
  
  ##### 累乗 #####
  # pow(x, y, z) -> x**y % z
  
  
  def inputInt():
      return int(input())
  
  
  def inputMap():
      return map(int, input().split())
  
  
  def inputList():
      return list(map(int, input().split()))
  
  
  inf = float("inf")
  mod = 1000000007
  
  
  # -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  def main():
      N = inputInt()
      xyz = []
      for i in range(N):
          x, y, h = inputMap()
          xyz.append((x, y, h))
  
      for ansY in range(0, 101):
          for ansX in range(0, 101):
              ansH = -1
              for i, val in enumerate(xyz):
                  x, y, h = val
                  if h > 0:
                      tmp = h + abs(ansX - x) + abs(ansY - y)
                      if ansH == -1:
                          ansH = tmp
                      else:
                          if tmp != ansH:
                              ansH = -2
                              break
              # print(ansH)
              if ansH == -2:
                  continue
  
              for i, val in enumerate(xyz):
                  x, y, h = val
                  if h == 0:
                      tmp = abs(ansX - x) + abs(ansY - y)
                      if ansH > tmp:
                          ansH = -2
                          break
              if ansH == -2:
                  continue
  
              print("{} {} {}".format(ansX, ansY, ansH))
  
  
  # -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  # special thanks :
  #  https://nagiss.hateblo.jp/entry/2019/07/01/185421
  # -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  # nCr mod m
  # rがn/2に近いと非常に重くなる
  def combination(n, r, mod=10**9 + 7):
      r = min(r, n - r)
      res = 1
      for i in range(r):
          res = res * (n - i) * modinv(i + 1, mod) % mod
      return res
  
  
  # mを法とするaの乗法的逆元
  def modinv(a, mod=10**9 + 7):
      return pow(a, mod - 2, mod)
  
  
  def egcd(a, b):
      if a == 0:
          return b, 0, 1
      else:
          g, y, x = egcd(b % a, a)
          return g, x - (b // a) * y, y
  
  
  # nHr mod m
  # 問題によって、combination()を切り替えること
  def H(n, r, mod=10**9 + 7):
      # comb = Combination(n+r-1, mod)
      # return comb(n+r-1, r)
      return combination(n + r - 1, r, mod)
  
  
  class Combination:
      """
      O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
      n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
      使用例：
      comb = Combination(1000000)
      print(comb(5, 3))  # 10
      """
  
      def __init__(self, n_max, mod=10**9 + 7):
          self.mod = mod
          self.modinv = self.make_modinv_list(n_max)
          self.fac, self.facinv = self.make_factorial_list(n_max)
  
      def __call__(self, n, r):
          return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n - r] % self.mod
  
      def make_factorial_list(self, n):
          # 階乗のリストと階乗のmod逆元のリストを返す O(n)
          # self.make_modinv_list()が先に実行されている必要がある
          fac = [1]
          facinv = [1]
          for i in range(1, n + 1):
              fac.append(fac[i - 1] * i % self.mod)
              facinv.append(facinv[i - 1] * self.modinv[i] % self.mod)
          return fac, facinv
  
      def make_modinv_list(self, n):
          # 0からnまでのmod逆元のリストを返す O(n)
          modinv = [0] * (n + 1)
          modinv[1] = 1
          for i in range(2, n + 1):
              modinv[i] = self.mod - self.mod // i * modinv[self.mod % i] % self.mod
          return modinv
  
  
  if __name__ == "__main__":
      main()
  
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."}]