n = STDIN.gets.chomp.to_i
posts = []
n.times do
  pts = STDIN.gets.chomp.split(/ +/).map(&:to_i)
  posts << pts
end
xy = []
(0..100).each do |x|
  (0..100).each do |y|
    xy << [x,y]
  end
end

result = []

xy.each do |pt|
  height = []
  posts.each do |post|
    h = (pt[0] - post[0]).abs + (pt[1] - post[1]).abs + post[2]
    
    #puts "pt:%s post:%s height:%s h:%d" % [pt, post, height, h ]
    
    if height.empty? 
        height = [ h, post[2]==0 ]
    else
      if height[1] == true
      	if h <= height[0]
      		height = [ h, post[2]==0 ]
      	else
      	  height = []
      	  break
      	end
      else
        if post[2] == 0
        	if height[0] > h
        	  height = []
        	  break
        	end
        else
          if h != height[0]
        		height = []
        		break
        	end
        end
      end
    end
  end
  
  if ! height.empty?
    
    if result.empty? || height[0] > result[2]
    	result = pt + [ height[0] ]
    end
  end
end

puts result.join(" ")
