import kotlin.math.abs

fun longList() = readLine()?.split(" ")?.map(String::toLong) ?: TODO()
fun main() {
    data class Point(val x: Int, val y: Int, val h: Long)

    val n = readLine()?.toInt() ?: return
    val points = mutableListOf<Point>()
    repeat(n) {
        val (x, y, h) = longList()
        points.add(Point(x.toInt(), y.toInt(), h))
    }
    points.sortByDescending { it.h }

    0.until(101).forEach { x ->
        0.until(101).forEach { y ->
            run loop@{
                var d = -1L
                points.forEach {
                    val diff = it.h + abs(it.x - x) + abs(it.y - y)
                    if (d == -1L) {
                        d = diff
                    } else {
                        if (it.h > 0L && d != diff) {
                            return@loop
                        }
                        if (it.h == 0L && d > diff) {
                            return@loop
                        }
                    }
                }
                println("$x $y $d")
                return
            }
        }
    }
}