import java.lang.Math.abs
import java.lang.Math.max
import java.util.*

fun main(args: Array<String>) {
    Scanner(System.`in`).use {
        val n = it.nextInt()
        val x = mutableListOf<Int>()
        val y = mutableListOf<Int>()
        val h = mutableListOf<Int>()
        var chi = -1

        for (i in 0 until n) {
            x.add(it.nextInt())
            y.add(it.nextInt())
            val hh = it.nextInt()
            h.add(hh)
            if (chi == -1 && 0 < hh) {
                chi = i
            }
        }

        for (cx in 0..100) {
            for (cy in 0..100) {
                val ch = h[chi] + abs(x[chi] - cx) + abs(y[chi] - cy)
                var r = true

                for (k in 0 until n) {
                    if (k != chi) {
                        r = r && max(ch - abs(x[k] - cx) - abs(y[k] - cy), 0) == h[k]
                        if (!r) {
                            break
                        }
                    }
                }

                if (r) {
                    println("%d %d %d".format(cx, cy, ch))
                    return
                }
            }
        }
    }
}
