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 = 0
    var yy = 0
    var hh = 0

    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 = cx
        yy = cy
        hh = p.head
      }

    }

    println(s"$xx $yy $hh")
  }

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