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

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)]
    let (x,y,h) = head [(i,j,head xs) | i <- [0..100], j <- [0..100], let xs = map (flip f (i,j)) xyh, all (== (head xs)) xs]
    putStr $ show x ++ " "
    putStr $ show y ++ " "
    putStr $ (show h :: String)
    putStrLn "" 