integer N
integer,allocatable,dimension(:)::x,y
integer(16),allocatable,dimension(:)::h
integer(16) height
logical check
read*,N
allocate(X(N),Y(N),H(N))

do i=1,N
  read*,x(i),y(i),h(i)
end do

do i=0,100
  do j=0,100
    check=.true.
    do k=1,N
      if(h(k)==0)cycle
      height=h(k)+abs(i-x(k))+abs(j-y(k))
    end do
    do k=1,N
      if(h(k)/=max(height-abs(i-x(k))-abs(j-y(k)),0))check=.false.
    end do
    if(check)then
      print"(i0,A,i0,A,i0)",i," ",j," ",height
    endif
  end do
end do
end