import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)

    val n = sc.nextInt()
    val points = Array.fill(n) {
      val x, y, h = sc.nextInt()
      (x, y, h)
    }

    var xx = Array[Int]()
    var yy = Array[Int]()
    var hh = Array[Int]()

    for {
      cx <- 0 to 100
      cy <- 0 to 100
    } {
      val p =
        points
          .map {
            case (x, y, h) =>
              h match {
                case 0 => None
                case _ => Option(h + math.abs(x - cx) + math.abs(y - cy))
              }
          }
          .filter(_.isDefined)
          .map(_.get)
      if (p.foldLeft((true, p.head)) { case ((b, i), n) => (b && i == n, n) }
            ._1) {
        xx = xx :+ cx
        yy = yy :+ cy
        hh = hh :+ p.head
      }

    }

    for (i <- xx.indices) {
      if (points.forall {
            case (x, y, h) =>
              h == math.max(
                0,
                hh(i) - math.abs(x - xx(i)) - math.abs(y - yy(i))
              )
          }) println(s"${xx(i)} ${yy(i)} ${hh(i)}")

    }

  }

  def debug(args: Any*): Unit = {
    Console.err.println(args.mkString(" "))
  }
}
