type ABC(stream:System.IO.TextReader) =
  member this.Scan1 f = stream.ReadLine() |> f
  member this.Scan2 f = stream.ReadLine().Split() |> Array.map f |> (fun a -> (a.[0], a.[1]))
  member this.Scan3 f = stream.ReadLine().Split() |> Array.map f |> (fun a -> (a.[0], a.[1], a.[2]))
  member this.Scan4 f = stream.ReadLine().Split() |> Array.map f |> (fun a -> (a.[0], a.[1], a.[2], a.[3]))
  member this.ScanVecH f = stream.ReadLine().Split() |> Array.map f
  member this.ScanVecV n f = seq { for i in 1..n -> stream.ReadLine() |> f }
  member this.ScanMatrix n f  = seq { for i in 1..n do yield stream.ReadLine().Split() |> Array.map f }
  member this.ScanCharMatrix n = [| for i in 1..n -> stream.ReadLine().ToCharArray() |]
  member this.Close () = stream.Close()

let util = ABC(stdin)

let isOK (cx,cy,ch) (x,y,h) =
  h = List.max [0; ch - (abs (cx - x)) - (abs (cy - y))]

let N = util.Scan1 int
let xs = util.ScanMatrix N int |> Seq.toList |> List.map (fun x -> x.[0],x.[1],x.[2] )
let x0, y0, h0 = List.find (fun (x,y,h) -> h > 0) xs

[ for cx in 0..100 do
  for cy in 0..100 do
    let ch = h0 + (abs (x0-cx)) + (abs (y0-cy))
    yield (cx,cy,ch)
]
|> List.filter (fun answer -> xs |> List.forall (isOK answer))
|> List.head
|> fun (x,y,h) -> printfn "%d %d %d" x y h

util.Close()
