fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val xyhs = (1..N).map{ readLine()!!.split(" ").map{ it.toInt() } }
    for(x in 0..100)y@for(y in 0..100){
        val p=xyhs.first{ it[2]!=0 }
        val h = p[2] + Math.abs(x-p[0]) + Math.abs(y-p[1])
        if(xyhs.all{ it[2] + Math.abs(x-it[0]) + Math.abs(y-it[1]) == h
                || it[2]==0 && Math.abs(x-it[0]) + Math.abs(y-it[1]) >=h}) {
            println("$x $y $h")
            return
        }
    }
}