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
  for x=0 to 100 do
   for y=0 to 100 do
     match ls with
     | [] -> assert false
     | l::ls ->
     let h1 = ck x y l in
     if not (List.exists (fun p -> ck x y p <> h1) ls) then (
             Printf.printf "%d %d %d\n" x y h1;
             exit 0
     )
   done
  done
)
