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

query :: [(Int,Int,Int)] -> [(Int,Int,Int)]
query cs =
  foldl' (flip $ \(x,y,h) ->
             filter $ if h > 0
                      then (\(cx,cy,ch) -> ch == h + abs (x-cx) + abs (y-cy))
                      else (\(cx,cy,ch) -> ch <= abs (x-cx) + abs (y-cy)))
  [(cx,cy,h0 + abs (x0-cx) + abs (y0-cy)) | cx <- [0..100], cy <- [0..100]]
  cs'
  where
    (cs0,(x0,y0,h0):cs1) = span (\(_,_,h) -> h <= 0) cs
    cs' = cs0 ++ cs1

main :: IO ()
main = do
  n <- getLine
  cs <- map ((\(a:b:c:_)->(a,b,c))
              . unfoldr (B.readInt . B.dropWhile (== ' '))) 
         . B.lines <$> B.getContents
  let (cx,cy,ch):_ = query cs
  putStrLn $ show cx ++ ' ' : show cy ++ ' ' : show ch