object Main extends App {
	import scala.math._
	val N = scala.io.StdIn.readInt
	var a = List[(Int, Int, Int)]()

	for(i<-0 until N){
		val Array(t1, t2, t3) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
		if(t3 > 0)	a = (t1, t2, t3) :: a
	}

	for(x <- 0 to 100){
		for(y <- 0 to 100){
			val k = a.map{case (t1, t2, t3) => abs(t1 - x) + abs(t2 - y) + t3}.toSet
			if(k.size == 1){
				println(x + " " + y + " " + k.head)
			}
		}
	}
}