n = gets.to_i
list = []
n.times {list.push(gets.split.map(&:to_i))}
mflag = false
101.times do |i|
    101.times do |j|
        flag = true
        h = nil
        
        list.each do |s|
            if list.size == 1
                puts "#{s[0]} #{s[1]} #{s[2]}"
                flag = false
                mflag = true
            else
                h = [s[2] + (s[0]-i).abs + (s[1]-j).abs, 0].max if h.nil?
                flag = false if h != [s[2] + (s[0]-i).abs + (s[1]-j).abs, 0].max
            end
        end
        if flag
            puts "#{i} #{j} #{h}"
            mflag = true
        end
        break if mflag
    end
    break if mflag
end