data class Data(
    val x: Int,
    val y: Int,
    val h: Int
)

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val input = Array<Data>(n) {
        val (x, y, h) = readLine()!!.split(" ").map(String::toInt)
        Data(x, y, h)
    }
    val nonZeroH = input.first { it.h != 0 }
    for (cx in 0..100) {
        for (cy in 0..100) {
            val ch = nonZeroH.h + Math.abs(nonZeroH.x - cx) + Math.abs(nonZeroH.y - cy)
            val chk = input.all {
                it.h == Math.max(ch - Math.abs(it.x - cx) - Math.abs(it.y - cy), 0)
            }
            if (chk) {
                println("$cx $cy $ch")
                return
            }
        }
    }
}
