import java.util.*

fun main(arr: Array<String>) {
    val n = readLine()!!.toInt()
    val posList = (1..n).map { readLine()!!.split(" ").map { it.toInt() }.let { Pos(it[1], it[0], it[2]) } }
    val list = mutableListOf<Pos>()
    val posList1 = posList.filter { it.h > 0 }
    (0..100).forEach { y->(0..100).forEach { x->list.add(Pos(y,x, Math.abs(posList1.first().y-y)+Math.abs(posList1.first().x-x)+posList1.first().h)) } }
    for(pos in posList1.drop(1)) {
        for(idx in list.indices.reversed()) {
            val diff = Math.abs(pos.y-list[idx].y) + Math.abs(pos.x-list[idx].x)
            if(pos.h + diff != list[idx].h) {
                list.removeAt(idx)
            }
            if(list.size <= 1) {
                break
            }
        }
        if(list.size <= 1) {
            break
        }
    }
    for(pos in posList.filter { it.h == 0 }) {
        for(idx in list.indices.reversed()) {
            val diff = Math.abs(pos.y-list[idx].y) + Math.abs(pos.x-list[idx].x)
            if(list[idx].h - diff > 0) {
                list.removeAt(idx)
            }
            if(list.size <= 1) {
                break
            }
        }
        if(list.size <= 1) {
            break
        }
    }
    println("${list.first().x} ${list.first().y} ${list.first().h}")
}

class Pos(val y: Int, val x: Int, var h: Int)