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

	var Array(p1, p2, p3) = Array(0, 0, 0)

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

		if(t3 > 0){
			p1 = t1
			p2 = t2
			p3 = t3
		}
	}

	

	for(x <- 0 to 100){
		for(y <- 0 to 100){
			val h = p3 + abs(p1 - x) + abs(p2 - y)
			if(check(h, x, y)){
				println("%d %d %d".format(x, y, h))
			}
		}
	}

	def check(h: Int, x: Int, y: Int): Boolean = {
		val max = a.map{case(t1, t2, t3) => t3 - math.max(0, h - math.abs(t1 - x) - math.abs(t2 - y))}.sum

		if(max == 0) return true
		else return false
	}
}
