import java.io.PrintWriter
import java.util.*
import kotlin.math.abs

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun nextList() = next().split(" ")
fun nextIntList() = nextList().map(String::toInt)
fun nextLongList() = nextList().map(String::toLong)
fun nextDoubleList() = nextList().map(String::toDouble)

val pw = PrintWriter(System.out)
fun print(s: Any = "") = pw.print(s)
fun println(s: Any = "") = pw.println(s)

fun <T> Iterable<T>.join(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "") = joinToString(separator, prefix, postfix)
fun <T> Array<T>.join(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "") = joinToString(separator, prefix, postfix)

fun main(args: Array<String>) {
    main()
    pw.flush()
}

fun main() {
    val N = nextInt()
    val zque = ArrayDeque<P>()
    val que = ArrayDeque<P>()
    repeat(N) {
        val (x, y, h) = nextLongList()
        if (h == 0L) {
            zque.add(P(x, y, h))
            return@repeat
        }
        if (que.isEmpty()) {
            for (X in 0L..100L) {
                for (Y in 0L..100L) {
                    val H = h + abs(X - x) + abs(Y - y)
                    que.add(P(X, Y, H))
                }
            }
            return@repeat
        }
        repeat(que.size) {
            val p = que.poll()
            val (X, Y, H) = p
            if (h + abs(X - x) + abs(Y - y) == H) {
                que.add(p)
            }
        }
    }
    for (zp in zque) {
        val (x, y, _) = zp
        repeat(que.size) {
            val p = que.poll()
            val (X, Y, H) = p
            if (H - abs(X - x) - abs(Y - y) <= 0L) {
                que.add(p)
            }
        }
    }
    val (X, Y, H) = que.first
    println("$X $Y $H")
}

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