
object Main extends App {
  import scala.io.StdIn._

  val n = readLine.trim.toInt
  val info = Array.tabulate(n){_ ⇒
    val Array(x, y, h) = readLine.trim.split(' ').map(_.toInt)
    Info(x, y, h)
  }
  println(
    (0 to 100).flatMap{x ⇒ (0 to 100).map{y ⇒ Coordinate(x, y)}}.find{center ⇒
      info.flatMap(i ⇒ inverseHeight(center, i)).let(a ⇒ if (a.nonEmpty) a.forall(_ == a.head) else false)
    }.get.let(center ⇒ s"${center.x} ${center.y} ${info.flatMap(inverseHeight(center, _)).head}")
  )
  def inverseHeight(center: Coordinate, info: Info): Option[Long] = {
    ((center.x - info.x).abs + (center.y - info.y).abs + info.h).let(h ⇒ if (h > 0) Some(h) else None)
  }
  implicit class RichInt(val value: Long){
    def abs: Long = if (value >= 0) value else -value
  }
  case class Coordinate(x: Int, y: Int)
  case class Info(x:Int, y:Int, h:Long)
  implicit class ScopeFunc[T](value: T){
    def let[A](func: T ⇒ A): A = func(value)
    def also(func: T ⇒ Unit): T = {
      func(value)
      value
    }
  }
}