import java.math.*

fun main(args: Array<String>) {
    val N = readInputLine().toInt()
    
    val points = mutableListOf<Triple<Int, Int, Int>>()
    
    var ref = Triple(-1, -1, -1)
    
    for (i in 1..N) {
        val (x, y, h) = readInputLine().split(" ").map{it.toInt()}
        val point = Triple(x, y, h)
        points.add(point)
        if (ref.first == -1 && h != 0) {
            ref = point
        }
    }
    
    for (x in 0..100) {
        for (y in 0..100) {
            val h = ref.third + Math.abs(x - ref.first) + Math.abs(y - ref.second)
            
            var ok = true
            
            for (p in points) {
                if (p.third != Math.max(h - Math.abs(x - p.first) - Math.abs(y - p.second), 0)) {
                    ok = false
                    break
                }
            }
            
            if (ok) {
                println("$x $y $h")
                return
            }
        }
    }
}

fun readInputLine(): String {
    return readLine()!!
}
