object Main {
  def main(args: Array[String]): Unit = {
    val s = new Main()
    s.solve()
    s.out.flush()
  }
}

class Main {
  import java.io._
  import java.util.StringTokenizer

  import scala.collection.mutable
  import scala.util.Sorting
  import math.{abs, max, min}
  import mutable.{ArrayBuffer, ListBuffer}
  import scala.reflect.ClassTag

  val MOD = 1000000007
  val out = new PrintWriter(System.out)

  def solve(): Unit = {
    val N = ni()
    val X, Y, H = Array.ofDim[Int](N)
    rep(N) { i =>
      X(i) = ni()
      Y(i) = ni()
      H(i) = ni()
    }

    sealed trait Height
    case class Range(to: Int) extends Height // inclusive
    case class Just(num: Int) extends Height
    def intersect(h1: Height, h2: Height): Option[Height] = {
      (h1, h2) match {
        case (Just(a), Just(b)) if a == b => Some(Just(a))
        case (Range(a), Range(b)) => Some(Range(min(a, b)))
        case (Just(a), Range(b)) if a <= b => Some(Just(a))
        case (Range(b), Just(a)) if a <= b => Some(Just(a))
        case _ => None
      }
    }

    def calcH(x: Int, y: Int): Option[Int] = {
      var height: Height = Range(1e9.toInt + 200)

      rep(N) { i =>
        val d = abs(X(i) - x) + abs(Y(i) - y)
        val cur = if (H(i) == 0){
          Range(d)
        } else {
          Just(H(i) + d)
        }

        intersect(height, cur) match {
          case Some(next) => height = next
          case None => return None
        }
      }

      height match {
        case Just(a) => Some(a)
        case Range(a) if a > 0 => Some(1)
        case Range(a) if a == 0 => None
      }
    }

    rep(101) { x =>
      rep(101) { y =>
        calcH(x, y) match {
          case None =>
          case Some(h) =>
            out.println(s"$x $y $h")
            return
        }
      }
    }
  }


  class InputReader(val stream: InputStream) {
    private val reader = new BufferedReader(new InputStreamReader(stream), 32768)
    private var tokenizer: StringTokenizer = _

    def next(): String = {
      while (tokenizer == null || !tokenizer.hasMoreTokens)
        tokenizer = new StringTokenizer(reader.readLine)
      tokenizer.nextToken
    }

    def nextInt(): Int = next().toInt
    def nextLong(): Long = next().toLong
    def nextChar(): Char = next().charAt(0)
  }
  val sc = new InputReader(System.in)
  def ni(): Int = sc.nextInt()
  def nl(): Long = sc.nextLong()
  def nc(): Char = sc.nextChar()
  def ns(): String = sc.next()
  def ns(n: Int): Array[Char] = ns().toCharArray
  def na(n: Int): Array[Int] = map(n)(_ => ni())
  def nal(n: Int): Array[Long] = map(n)(_ => nl())
  def nm(n: Int, m: Int): Array[Array[Char]] = map(n) (_ => ns(m))
  def rep(n: Int, offset: Int = 0)(f: Int => Unit): Unit = {
    var i = offset
    val N = n + offset
    while(i < N) { f(i); i += 1 }
  }
  def rep_r(n: Int, offset: Int = 0)(f: Int => Unit): Unit = {
    var i = n - 1 + offset
    while(i >= offset) { f(i); i -= 1 }
  }

  def map[@specialized A: ClassTag](n: Int)(f: Int => A): Array[A] = {
    val res = Array.ofDim[A](n)
    rep(n)(i => res(i) = f(i))
    res
  }

  def sumL(as: Array[Int]): Long = {
    var s = 0L
    rep(as.length)(i => s += as(i))
    s
  }
}


Measured memory_bytes: 49888