object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)

    val N = sc.nextInt()
    val X = new Array[Int](N)
    val Y = new Array[Int](N)
    val H = new Array[Int](N)

    (0 until N) foreach { i =>
      val x, y, h = sc.nextInt()
      X(i) = x
      Y(i) = y
      H(i) = h
    }

    val valid = (0 until N) filter (i => H(i) >= 1)

    def solve(): Option[(Int, Int, Int)] = {
      var px = 0
      while (px <= 100) {
        var py = 0
        while (py <= 100) {
          var i = 0
          val candidates = valid. map { i =>
            H(i) + Math.abs(X(i) - px) + Math.abs(Y(i) - py)
          }
          if (candidates.forall(_ == candidates.head))
            return Some(px, py, candidates.head)
          py += 1
        }
        px += 1
      }
      None
    }

    solve() map (r => s"${r._1} ${r._2} ${r._3}") foreach println
  }

}
