import Control.Applicative
import Control.Monad
import Data.List
import Data.Maybe (catMaybes)
import Text.Printf (printf)

dst :: (Int, Int) -> (Int, Int) -> Int
dst (x1, y1) (x2, y2) = abs (x2 - x1) + abs (y2 - y1)

f1 :: (Int, Int) -> ((Int, Int), Int) -> Int
f1 (cx, cy) ((x, y), h) = dst (x, y) (cx, cy) + h

f2 :: (Int, Int) -> [((Int, Int), Int)] -> Maybe ((Int, Int), Int)
f2 cs xss = if all (== y) (y:ys) then Just (cs, y) else Nothing
 where
    (y:ys) = fmap (f1 cs) xss

main :: IO ()
main = do
    n <- readLn :: IO Int
    xss <- replicateM n $ do
        [x, y, h] <- fmap read . words <$> getLine :: IO [Int]
        return ((x, y), h)
    let cs = [(x, y) | x <- [0 .. 100], y <- [0 .. 100]]
    let ms = fmap (flip f2 xss) cs
    let ((cx, cy), h) = head $ catMaybes ms
    printf "%d %d %d\n" cx cy h