let ck cx cy (x1,y1,h1) = abs(cx-x1)+abs(cy-y1)+h1 in
Scanf.scanf "%d\n" (fun n->
  let rec loop i = 
    if i=n then [] else 
    let m = Scanf.scanf "%d %d %d\n" (fun x1 y1 h1->(x1,y1,h1)) in
    m::loop (i+1)
  in
  let ls = loop 0 in
  let (ls1,ls2) = List.partition(fun(x1, y1, h1)->h1>0) ls in
  for x= 0  to  100  do
   for y= 0  to  100  do
     match ls1 with
     | [] -> assert false
     | [(x1,y1,h1)] -> Printf.printf "%d %d %d\n" x1 y1 h1; exit 0
     | l::ls ->
     let h = ck x y l in
     if (List.for_all (fun (x1,y1,h1) -> ck x y (x1,y1,h1) = h) ls) then (
             Printf.printf "%d %d %d\n" x y h;
             exit 0
     )
   done
  done
)


