let () = Scanf.scanf "%d" @@ fun n ->
  let xyhs = Array.init n @@ fun _ ->
    Scanf.scanf "\n%d %d %d" @@ fun x y h -> x, y, h in
  let (cx, cy, h) :: _ =
    List.concat @@ Array.to_list @@ Array.init 101 @@ fun cx ->
      List.concat @@ Array.to_list @@ Array.init 101 @@ fun cy ->
        let (l, r) = Array.fold_left (fun (l, r) -> function
          | (xi, yi, 0) -> (l, min r (abs (xi - cx) + abs (yi - cy)))
          | (xi, yi, hi) ->
              let h = hi + abs (xi - cx) + abs (yi - cy) in
              (max l h, min r h)) (1, max_int) xyhs in
        if r <> l then [] else [(cx, cy, l)] in
  Printf.printf "%d %d %d\n" cx cy h
