#input of int(split by space)
def get_i()
  return gets.chomp.split(" ").map(&:to_i)
end
#input of float(split by space)
def get_f()
  return gets.chomp.split(" ").map(&:to_f)
end
#input of string(split by space)
def get()
  return gets.chomp.split(" ")
end
#input of string(split per one character)
def get_nsp()
  return gets.chomp.split("")
end
#yes or no decision
def yn_judge(bool,y="Yes",n="No")
  return bool ? y : n 
end
#create of array
def array(size1,init=nil,size2=-1)
  if size2==-1
    return Array.new(size1){init}
  else
    return Array.new(size2){Array.new(size1){init}}
  end
end

def max(a,b)
    return a>b ? a : b
end

def min(a,b)
    return a>b ? b : a
end

INF=Float::INFINITY

N=gets.to_i
xyh=array(N)
N.times do|i|
    xyh[i]=get_i
end
xyh.sort!{|x,y| y[2]<=>x[2]}
ans_x=-1
ans_y=-1
ans_h=-1
101.times do|cx|
    101.times do|cy|
        nh=-1
        flag=true
        xyh.each do|x,y,h|
            if h.zero?
                unless nh<=h+(x-cx).abs+(y-cy).abs
                  flag=false
                  break
                end
                next
            end
            if nh==-1
                nh=h+(x-cx).abs+(y-cy).abs
            else
                if nh!=(h+(x-cx).abs+(y-cy).abs)
                    flag=false
                    break
                end
            end 
        end
        if flag
            ans_x=cx
            ans_y=cy
            ans_h=nh
            break
        end
    end
    if(ans_h!=-1)
        break
    end
end
puts [ans_x,ans_y,ans_h].join(" ")