'use strict'
function main(input) {
  input = input.trim().split('\n')
  input.shift()
  input = input.map(v => v.split(' ').map(w => w - 0))

  for (let x = 0; x < 101; x++) {
    for (let y = 0; y < 101; y++) {
      let same = true
      let height = -1
      input.forEach(p => {
        if (p[2] > 0) {
          const h = p[2] + Math.abs(x - p[0]) + Math.abs(y - p[1])
          if (height < 0) height = h
          if (height !== h) same = false
        }
      })
      if (same) return console.log([x, y, height].join(' '))
    }
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
