import java.util.*

fun main(args:Array<String>){
    val n = readLine()!!.toInt()
    val x = IntArray(n)
    val y = IntArray(n)
    val h = IntArray(n)
    for(i in 0 until n){
        val (X,Y,H) = readLine()!!.split(" ").map{it.toInt()}
        x[i] = X
        y[i] = Y
        h[i] = H
    }
    for(i in 0 .. 100){
        for(j in 0 .. 100){
            var ok = true
            var H = 0
            for(k in 0 until n){
                if(h[k] != 0){
                    H = h[k] + Math.abs(i - x[k]) + Math.abs(j - y[k])
                }
            }
            for(k in 0 until n){
                if(h[k] == 0){
                    if(H - Math.abs(i - x[k]) - Math.abs(j - y[k]) > 0) ok = false
                }
                else{
                    if(H - Math.abs(i - x[k]) - Math.abs(j - y[k]) != h[k]) ok = false
                }
            }
            if(ok){
                println("${i} ${j} ${H}")
                return
            }
        }
    }
}
