
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)}}.flatMap { center ⇒
      val suspect = info.map(inverseHeight(center, _))
      suspect.find{
        case Equal(_) ⇒ true
        case _ ⇒ false
      } match {
        case Some(Equal(h)) ⇒ if (suspect.forall{
          case Equal(height) ⇒ h == height
          case Lower(height) ⇒ h <= height
        }) Some(center, h) else None
        case _ ⇒ if(suspect.forall{
          case Equal(height) ⇒ height == 1
          case Lower(height) ⇒ 1 <= height
        }) Some(center, 1) else None
      }
    }.head.let{case (Coordinate(x, y), h) ⇒ s"$x $y $h"}
  )
  def inverseHeight(center: Coordinate, info: Info): Either = {
    info match {
      case Info(x, y, 0) ⇒ Lower((center.x - x).abs + (center.y - y))
      case Info(x, y, h) ⇒ Equal(h + (center.x - x).abs + (center.y - y).abs)
    }
  }
  sealed trait Either
  case class Lower(height: Long) extends Either
  case class Equal(height: Long) extends Either
  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
    }
  }
}