import java.util.Scanner

import scala.collection.mutable

object Main extends App {
  val sc = new Scanner(System.in)
  val n = sc.nextInt
  val xyhs = Seq.fill(n)((sc.nextInt, sc.nextInt, sc.nextInt))
  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 (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}")
}
