import Control.Monad

main :: IO ()
main = do
  n <- readLn
  xs <- replicateM n $ do
          [x,y,h] <- getInts
          return (x,y,h)
  let x = head $ dropWhile (\(_,_,h) -> h < 1) xs
  putStrLn $ format $ solve x xs

getInts :: IO [Int]
getInts = map read . words <$> getLine

format :: (Int,Int,Int) -> String
format (x,y,h) = unwords $ map show [x,y,h]

solve :: (Int,Int,Int) -> [(Int,Int,Int)] -> (Int,Int,Int)
solve x xs = head [c | x0 <- [0..100], y0 <- [0..100], let c = (x0,y0,calcH x x0 y0), check xs c]

calcH :: (Int,Int,Int) -> Int -> Int -> Int
calcH (x1,y1,h1) x0 y0 = h1 + abs (x1-x0) + abs (y1-y0)

check :: [(Int,Int,Int)] -> (Int,Int,Int) -> Bool
check xs (x0,y0,h0) = all valid xs
  where
    valid (x1,y1,h1) = h1 == max 0 (h0 - abs (x0-x1) - abs (y0-y1))
