open Printf
open Scanf
 
let id x = x
let pair x y = x, y
 
let n = scanf "%d" id
let vs = Array.init n (fun _ -> scanf " %d %d %d" (fun x y h -> x, y, h))
 
let () =
  for cx = 0 to 100 do
    for cy = 0 to 100 do
      let flg = ref true in
      let h = ref ~-1 in
      for i = 0 to n - 1 do
        let (x', y', h') = vs.(i) in
        if h' >= 0 then begin
          let v = abs (x' - cx) + abs (y' - cy) + h' in
          if !h < 0 then begin
            h := v;
          end; 
          if v <> !h then flg := false
        end
      done;
      if !flg && !h >= 0 then begin
        printf "%d %d %d\n" cx cy !h;
        exit 0
      end
    done
  done
