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 -*-
  
  #############
  # Libraries #
  #############
  
  import sys
  
  input = sys.stdin.readline
  
  import math
  
  # from math import gcd
  import bisect
  from collections import defaultdict
  from collections import deque
  from functools import lru_cache
  
  
  #############
  # Constants #
  #############
  
  MOD = 10**9 + 7
  INF = float("inf")
  
  #############
  # Functions #
  #############
  
  
  ######INPUT######
  def I():
      return int(input().strip())
  
  
  def S():
      return input().strip()
  
  
  def IL():
      return list(map(int, input().split()))
  
  
  def SL():
      return list(map(str, input().split()))
  
  
  def ILs(n):
      return list(int(input()) for _ in range(n))
  
  
  def SLs(n):
      return list(input().strip() for _ in range(n))
  
  
  def ILL(n):
      return [list(map(int, input().split())) for _ in range(n)]
  
  
  def SLL(n):
      return [list(map(str, input().split())) for _ in range(n)]
  
  
  ######OUTPUT######
  def P(arg):
      print(arg)
      return
  
  
  def Y():
      print("Yes")
      return
  
  
  def N():
      print("No")
      return
  
  
  def E():
      exit()
  
  
  def PE(arg):
      print(arg)
      exit()
  
  
  def YE():
      print("Yes")
      exit()
  
  
  def NE():
      print("No")
      exit()
  
  
  #####Shorten#####
  def DD(arg):
      return defaultdict(arg)
  
  
  #####Inverse#####
  def inv(n):
      return pow(n, MOD - 2, MOD)
  
  
  ######Combination######
  kaijo_memo = []
  
  
  def kaijo(n):
      if len(kaijo_memo) > n:
          return kaijo_memo[n]
      if len(kaijo_memo) == 0:
          kaijo_memo.append(1)
      while len(kaijo_memo) <= n:
          kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
      return kaijo_memo[n]
  
  
  gyaku_kaijo_memo = []
  
  
  def gyaku_kaijo(n):
      if len(gyaku_kaijo_memo) > n:
          return gyaku_kaijo_memo[n]
      if len(gyaku_kaijo_memo) == 0:
          gyaku_kaijo_memo.append(1)
      while len(gyaku_kaijo_memo) <= n:
          gyaku_kaijo_memo.append(
              gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo), MOD - 2, MOD) % MOD
          )
      return gyaku_kaijo_memo[n]
  
  
  def nCr(n, r):
      if n == r:
          return 1
      if n < r or r < 0:
          return 0
      ret = 1
      ret = ret * kaijo(n) % MOD
      ret = ret * gyaku_kaijo(r) % MOD
      ret = ret * gyaku_kaijo(n - r) % MOD
      return ret
  
  
  ######Factorization######
  def factorization(n):
      arr = []
      temp = n
      for i in range(2, int(-(-(n**0.5) // 1)) + 1):
          if temp % i == 0:
              cnt = 0
              while temp % i == 0:
                  cnt += 1
                  temp //= i
              arr.append([i, cnt])
      if temp != 1:
          arr.append([temp, 1])
      if arr == []:
          arr.append([n, 1])
      return arr
  
  
  #####MakeDivisors######
  def make_divisors(n):
      divisors = []
      for i in range(1, int(n**0.5) + 1):
          if n % i == 0:
              divisors.append(i)
              if i != n // i:
                  divisors.append(n // i)
      return divisors
  
  
  #####GCD#####
  def gcd(a, b):
      while b:
          a, b = b, a % b
      return a
  
  
  #####LCM#####
  def lcm(a, b):
      return a * b // gcd(a, b)
  
  
  #####BitCount#####
  def count_bit(n):
      count = 0
      while n:
          n &= n - 1
          count += 1
      return count
  
  
  #####ChangeBase#####
  def base_10_to_n(X, n):
      if X // n:
          return base_10_to_n(X // n, n) + [X % n]
      return [X % n]
  
  
  def base_n_to_10(X, n):
      return sum(int(str(X)[-i]) * n**i for i in range(len(str(X))))
  
  
  #####IntLog#####
  def int_log(n, a):
      count = 0
      while n >= a:
          n //= a
          count += 1
      return count
  
  
  #############
  # Main Code #
  #############
  
  N = I()
  
  data = []
  for i in range(N):
      x, y, h = IL()
      data.append((x, y, h))
  
  data = sorted(data, lambda x: x[2])
  
  import itertools
  
  x, y, h = data.pop()
  dic = {
      (i, j): h + (abs(i - x) + abs(j - y))
      for i, j in itertools.product(range(101), repeat=2)
  }
  
  while len(dic) > 1:
      x, y, h = data.pop()
      for i, j in itertools.product(range(101), repeat=2):
          if (i, j) in dic:
              if h > 0:
                  if dic[(i, j)] != h + (abs(i - x) + abs(j - y)):
                      dic.pop((i, j))
              else:
                  if dic[(i, j)] > h + (abs(i - x) + abs(j - y)):
                      dic.pop((i, j))
  
  ans = [k for k in dic][0]
  
  print(ans[0], ans[1], dic[ans])
  
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."}]