program main
Implicit None
integer(8)::n,i,j,u,xa,ya,ha,hb,k,m
integer(8),allocatable::x(:),y(:),h(:)
	
	read *,n
	allocate(x(n),y(n),h(n))
	
	do i = 1,n
		read *,x(i),y(i),h(i)
	enddo
	
	i = 1
	do while(h(i) == 0)
		i = i +1
	enddo
	
	u = h(i);xa = x(i);ya = y(i)
	
	do k = 0,100
		do j = 0,100
			ha = abs(k - xa)+abs(j - ya) + u
			do m = i + 1,n
				hb = ha - abs(x(m) - k) - abs(y(m) - j)
				if(hb < 0) hb = 0
				if(hb /= h(m)) exit
				if(m == n)then
					print 101,k,j,ha
					stop
				endif
			enddo
		enddo
	enddo
	
101 format(i0,1xi0,1xi0)
end program main