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

main = do
    n<-readLn::IO Int
    xyhs <- replicateM n (map read.words<$>getLine) ::IO [[Int]]
    let Just (_,(x,y,h)) = find (\(f,_)->f) $ map (f xyhs) [(cx,cy)|cx<-[0..100],cy<-[0..100]]
    putStrLn $ unwords $ map show [x,y,h]
--
f xyhs (cx,cy) = (all (g cx cy ch) xyhs, (cx,cy,ch))
    where
        Just(tx:ty:th:_) = find (\(_:_:h:_)->h>0) xyhs
        ch = th + abs(cx-tx) + abs(cy-ty)

g cx cy ch (x:y:h:_)
    | max (ch-abs(cx-x)-abs(cy-y)) 0 == h = True
    | otherwise = False
 