import qualified Data.ByteString.Char8 as B
import Control.Monad
import Data.Char
import Data.IORef

toTriple :: B.ByteString -> (Int, Int, Int)
toTriple bs =
    let
        Just (a, bs') = B.readInt bs
        Just (b, bs'') = B.readInt $ B.dropWhile isSpace bs'
        Just (c, _) = B.readInt $ B.dropWhile isSpace bs''
    in
        (a, b, c)

f :: (Int, Int, Int) -> (Int, Int) -> Int
f (x,y,h) (cx,cy) = (abs $ cx - x) + (abs $ cy - y) + h

main = do
    n <- readLn :: IO Int
    xyh <- replicateM n (toTriple <$> B.getLine) :: IO [(Int, Int, Int)]
    flag <- newIORef True
    forM_ [0..100] $ \i ->
        forM_ [0..100] $ \j -> do
            let xs = filter (/=0) $ map (flip f (i,j)) xyh
            unless (null xs) $ do
                let k = head xs
                let res = and $ map (\(x,y,h) -> (max (k-(abs$i-x)-(abs$j-y)) 0) == h) xyh
                flag' <- readIORef flag
                when (res && flag) $ do
                    putStr $ show i ++ " "
                    putStr $ show j ++ " "
                    putStrLn $ show k 
                    modifyIORef' flag (&&False)