data class XYH(val x: Int, val y: Int, val h: Int) {
    constructor(xyh: List<Int>): this(xyh[0], xyh[1], xyh[2])
}
fun main(args: Array<String>) {
    val N = nextInt()
    val xyh = Array(N) { XYH(listOfInt()) }
    for (x in 0 .. 100) {
        for (y in 0 .. 100) {
            var H: Int? = null
            var good = true
            for (it in xyh) {
                if (it.h > 0) {
                    val tmp = it.h + Math.abs(y - it.y) + Math.abs(x - it.x)
                    if (H == null) H = tmp
                    else if (H != tmp) {
                        good = false
                        break
                    }
                }
            }
            if (!good) continue
            val h = H!!
            for (it in xyh) {
                if (it.h == 0) {
                    val dist = Math.abs(y - it.y) + Math.abs(x - it.x)
                    if (h > dist) {
                        good = false
                        break
                    }
                }
            }
            if (!good) continue
            println("$x $y $h")
        }
    }
}
fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }
