Scanf.scanf "%d" (fun n ->
    let xyh = Array.init n (fun _ -> Scanf.scanf " %d %d %d" (fun x y h -> h, x, y)) in
    Array.sort compare xyh;

    let check cx cy =
        let h, x, y = xyh.(n - 1) in

        let ih = abs (cx - x) + abs (cy - y) + h in
        if Array.for_all (fun (h, x, y) -> max (ih - abs (cx - x) - abs (cy - y)) 0 = h) xyh then (
            Printf.printf "%d %d %d\n" cx cy ih;
            false
        ) else true
    in

    let rec loop_cy cy =
        let rec loop_cx cx =
            if cx > 100 then loop_cy (cy + 1) else 
                if check cx cy then loop_cx (cx + 1)
        in
        loop_cx 0
    in
    loop_cy 0 
)