import java.util.*

fun main(args:Array<String>) {
    val mod = 1000000007L
    var N = readLine()!!.toInt()

    val C = Array(N){ val (x,y,h) = readLine()!!.split(" ").map(String::toLong);Triple(x,y,h) }

    val c0 = C.first { it.third != 0L }

    for (x in 0..100){
        loop@for (y in 0..100) {
            var h = c0.third + Math.abs(x - c0.first) + Math.abs(y - c0.second)
            for (c in C) {
                if (c.third != Math.max(h - Math.abs(x - c.first) - Math.abs(y - c.second), 0L))
                    continue@loop
            }
            println("$x $y $h")
        }
    }
}