{-# LANGUAGE OverloadedStrings #-}
import Control.Monad
import Data.Char
import Data.Function
import Data.List
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import qualified Data.Vector.Unboxed as VU

main = do
  n <- getInt
  p:ps <- fmap (rsortOn snd) . replicateM n $ do
    [a, b, h] <- getIntList
    return ((a, b), h)
  putStrLn . unwords . map show . (\((x,y),h) -> [x,y,h]) $ solve p ps

solve :: ((Int, Int), Int) -> [((Int, Int), Int)] -> ((Int, Int), Int)
solve p ps = head . filter (valid ps) $ [((x, y), h)| x <- [0..100], y <- [0..100], let h = (snd p) + dist (x, y) (fst p)]
  where
    valid ps p = all (check p) ps
    check (p, h1) (q, h2)
      | h2 == 0 = dist p q >= h1
      | otherwise = dist p q == h1 - h2


dist :: (Int, Int) -> (Int, Int) -> Int
dist (x, y) (u, v) = abs (x - u) + abs (y - v)

rsortOn :: Ord b => (a -> b) -> [a] -> [a]
rsortOn f = sortBy (flip compare `on` f)

-- IO
readInt :: BS.ByteString -> Int
readInt = fst . fromJust . BS.readInt

getInt :: IO Int
getInt = readInt <$> BS.getLine

getIntList :: IO [Int]
getIntList = unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine

getIntVec :: Int -> IO (VU.Vector Int)
getIntVec n = VU.unfoldrN n (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine