import java.util.Scanner

import scala.collection.mutable

object Main extends App {
  val sc = new Scanner(System.in)
  val vec = mutable.ArrayBuffer.empty[(Int, Int, Int)]
  val N = sc.nextInt
  val X, Y, H = Array.fill(1009)(-1)
  var G = (-1, -1, -1)

  (1 to N) foreach { i =>
    X(i) = sc.nextInt
    Y(i) = sc.nextInt
    H(i) = sc.nextInt
    if (H(i) >= 1) {
      G = (X(i), Y(i), H(i))
    }
  }

  for {
    i <- 0 to 100
    j <- 0 to 100
  } {
    var V = G._3 + Math.abs(G._1 - i) + Math.abs(G._2 - j)
    V = Math.max(V, 0)
    var flag = true
    for (k <- 1 to N) {
      var VV = V - Math.abs(X(k) - i) - Math.abs(Y(k) - j)
      VV = Math.max(VV, 0)
      if (H(k) != VV) {
        flag = false
      }
    }
    if (flag) {
      vec.append((i, j, V))
    }
  }

  if (vec.size == 1) {
    println(s"${vec(0)._1} ${vec(0)._2} ${vec(0)._3}")
  }

  //  val xyhs = Seq.fill(n)((sc.nextInt, sc.nextInt, sc.nextInt))
  //  val excludes = xyhs.map { case (x, y, _) => (x, y) }
  //  val h_xys = mutable.Map.empty[(Int, Int), Int]
  //  xyhs.foreach { case (x, y, h) =>
  //    for {
  //      xx <- 0 to 100
  //      yy <- 0 to 100
  //    } {
  //      val hh = Math.abs(x - xx) + Math.abs(y - yy) + h
  //      val already = h_xys.get((xx, yy))
  //      if ((x, y) != (xx, yy) && excludes.contains((xx, yy))) {
  //
  //      } else if (already.isEmpty) {
  //        h_xys.update((xx, yy), hh)
  //      } else if (already.exists(_ != hh)) {
  //        h_xys.update((xx, yy), -1)
  //      }
  //    }
  //  }
  //  val center = h_xys.maxBy { case (_, h) => h }
  //  println(s"${center._1._1} ${center._1._2} ${center._2}")
}
