n = gets.to_i
arr = []
n.times{
    
    arr<<gets.split.map(&:to_i) }


arr2 = Array.new(101).map{Array.new(101,-1)}

for  i  in 0...101
    
    for j in 0...101
    
        for k in 0...n
        
            if arr2[i][j] == -1
                
                arr2[i][j] = (i-arr[k][0]).abs + (j-arr[k][1]).abs + arr[k][2]
                
            elsif arr2[i][j] != (i-arr[k][0]).abs + (j-arr[k][1]).abs + arr[k][2]
                
                break
                
                
            end
            
            if  k==n-1
                puts "#{i} #{j} #{arr2[i][j]}"
                exit
            end
        
        
        end
    
    
    end
    
    
end


