import java.util.*

fun main(args: Array<String>) {
	val scanner = Scanner(System.`in`)
	val n = scanner.nextLong()
	val xyhList = mutableListOf<Triple<Long, Long, Long>>().apply {
		for (i in 1..n)
			add(Triple(scanner.nextLong(), scanner.nextLong(), scanner.nextLong()))
	}.toList()
	mutableListOf<Triple<Long, Long, Long>>().apply {
		for (ifcx in 0L..100L)
			for (ifcy in 0L..100L) {
				val firstxyh = xyhList.first { it.third != 0L }
				val maybeh: Long = Math.abs(ifcx - firstxyh.first) + Math.abs(ifcy - firstxyh.second) + firstxyh.third
				if (xyhList.all { xyh ->
							xyh.third == Math.max(maybeh - Math.abs(ifcx - xyh.first) - Math.abs(ifcy - xyh.second), 0)
						})
					add(Triple(ifcx, ifcy, maybeh))
			}
	}.minBy { it.third }!!
			.let { println("${it.first} ${it.second} ${it.third}") }
}