import java.lang.Math._

import scala.io.StdIn._

object Main extends App {
  val N = readInt
  val hints = Seq.fill(N)((readInt, readInt, readInt))
  val (gx, gy, gh) = hints.find(_._3 >= 1).get

  val centers = for {
    xx <- 0 to 100
    yy <- 0 to 100
    v = gh + abs(gx - xx) + abs(gy - yy) if hints.forall { case (x, y, h) =>
      v - abs(x - xx) - abs(y - yy) == h
    }
  } yield (xx, yy, v)

  val (cx, cy, ch) = centers.head
  println(s"$cx $cy $ch")
}
