import java.lang.Math.abs
import java.lang.Math.max

fun main(array: Array<String>) = abc112c()

fun abc112c() {
    data class Coordinate(val x: Long, val y: Long, val h: Long) {
        override fun toString() = "$x $y $h"
    }

    val n = readLine()!!.toInt()
    val coordinates = Array(n) {
        val (x, y, h) = readLine()!!.split(' ').map { it.toLong() }
        Coordinate(x, y, h)
    }

    val referencePoint = coordinates.maxBy { it.h } ?: error("なんで？")

    for (x in 0..100L) {
        for (y in 0..100L) {
            val h = referencePoint.let { it.h + abs(x - it.x) + abs(y - it.y) }
            val all = coordinates.all { it.h == max(h - abs(x - it.x) - abs(y - it.y), 0) }
            if (all) return println(Coordinate(x, y, h))
        }
    }

    error("なんで？")
}
