fun main(args: Array<String>) {
    val xyh = (1..readLine()!!.toInt()).map { readLine()!!.split(" ").map(String::toInt) }.sortedByDescending { it[2] }
    for (x in 0..100) {
        for (y in 0..100) {
            val h = xyh[0][2] + Math.abs(x - xyh[0][0]) + Math.abs(y - xyh[0][1])
            val r = (1 until xyh.size).map { xyh[it][2] == listOf(h - Math.abs(x - xyh[it][0]) - Math.abs(y - xyh[it][1]), 0).max() }
            if (!r.contains(false)) print("$x $y $h")
        }
    }
}