import Control.Monad

main :: IO ()
main = do
  n <- readLn
  xyhs <- replicateM n $ map read . words <$> getLine
  let [xt, yt, ht] = head [ [x, y, h] | [x, y, h] <- xyhs, h > 0 ]
  putStrLn $ unwords $ map show $ solve xt yt ht xyhs

solve :: Int -> Int -> Int -> [[Int]] -> [Int]
solve xt yt ht xyhs =
  let
    (cx, cy) = head $ foldl (step xt yt ht) ((,) <$> [0 .. 100] <*> [0 .. 100]) xyhs
  in
    [cx, cy, ht + abs (xt - cx) + abs (yt - cy)]

step :: Int -> Int -> Int -> [(Int, Int)] -> [Int] -> [(Int, Int)]
step xt yt ht cxys [x, y, h] =
  [ (cx, cy)
  | (cx, cy) <- cxys
  , let ch = ht + abs (xt - cx) + abs (yt - cy)
  , h == (ch - abs (x - cx) - abs (y - cy)) `max` 0
  ]