n = gets.to_i

lx,rx,ly,ry = 0,100,0,100
clue = []
n.times do
  clue << gets.split.map(&:to_i)
end

ans = nil
101.times do |i|
  101.times do |j|
    flag = true
    h = nil
    clue.each do |pt|
      if pt[2] > 0
        if !h
          h = (i-pt[0]).abs + (j-pt[1]).abs + pt[2]
        else
          flag = false if h !=(i-pt[0]).abs + (j-pt[1]).abs + pt[2]
        end
      end
    end
    ans = "#{i} #{j} #{h}" if flag
  end
end
puts ans
