open System

let N = stdin.ReadLine() |> int
let data : (int * int * int) [] = Array.zeroCreate N
for i in 0..N-1 do
    let xyh = stdin.ReadLine().Split() |> Array.map int
    data.[i] <- (xyh.[0],xyh.[1],xyh.[2])

let mutable found = false
for i in 0..100 do
    for j in 0..100 do
        let (i0, j0, h0) = data.[0]
        let mutable di = i - i0
        let mutable dj = j - j0

        if di < 0 then
            di <- -di
        if dj < 0 then
            dj <- -dj
        let h = h0 + di + dj

        let mutable ng = false;
        for k in 1..N-1 do
            let (ik, jk, hk) = data.[k]
            let mutable di = i - ik
            let mutable dj = j - jk
            if di < 0 then
                di <- -di
            if dj < 0 then
                dj <- -dj
            if h - di - dj <> hk then
                ng <- true

        if ng = false then
            found <- true
            printfn "%d %d %d" i j h
