data class P(val x: Int, val y: Int, val h: Int)

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val arr = Array(n) {
        readLine()!!.split(" ").map { it.toInt() }.let { P(it[0], it[1], it[2]) }
    }
    for (cx in 0..100) {
        for (cy in 0..100) {
            val info = arr.firstOrNull { it.h > 0 }
            if (info == null) {
                if (!arr.any { it.x == cx && it.y == cy }) {
                    println("$cx $cy 1")
                    break
                }
            } else {
                val H = info.h + Math.abs(info.x - cx) + Math.abs(info.y - cy)
                if (arr.all { it.h == Math.max(0, H - Math.abs(it.x - cx) - Math.abs(it.y - cy)) }) {
                    println("$cx $cy $H")
                    return
                }
            }
        }
    }
}