import Control.Monad
import Data.List
import Data.Maybe

type Information = (Int,Int,Int)

main = do
  n <- readLn
  infos <- replicateM n $ (\[a,b,c]->(a,b,c)).map read.words<$>getLine
  putStr $ (\(a,b,c) -> unwords$map show [a,b,c]) $ solve infos

solve :: [Information] -> Information
solve infos = fromJust $ find isAns candidates where
  candidates = [(x,y,ih+abs(x-ix)+abs(y-iy))|x<-[0..100],y<-[0..100]]
  info@(ix,iy,ih) = fromJust $ find (\(_,_,h)->h/=0) infos
  isAns (cx,cy,ch) = all eval infos where
    eval (x,y,h) = h == max (ch-abs(x-cx)-abs(y-cy)) 0