n = int(eval(input()));_h=0

li = []

for _ in range(n):

	x,y,h = list(map(int,input().split()))

	li.append((x,y,h))

	if not _h:

		_x,_y,_h = x,y,h

for i in range(101):

	for j in range(101):

		H = _h + abs(i-_x) + abs(j-_y)

		if all(h==max(0,H-abs(i-x)-abs(j-y)) for (x,y,h) in li):

			print((i,j,H))

			exit()

		else:

			pass
l=[];A=abs;r=list(range(101))

for _ in range(int(eval(input()))):

	*t,=list(map(int,input().split()))

	l+=[t]

	if t[2]:a,b,c=t

for i in r:

	for j in r:

		H=c+A(i-a)+A(j-b)

		if all(h==max(0,H-A(i-x)-A(j-y))for x,y,h in l):

			print((i,j,H))
n = int(eval(input()))
_h = 0
li = []
for _ in range(n):
    x, y, h = list(map(int, input().split()))
    li.append((x, y, h))
    if not _h:
        _x, _y, _h = x, y, h
for i in range(101):
    for j in range(101):
        H = _h + abs(i - _x) + abs(j - _y)
        if all(h == max(0, H - abs(i - x) - abs(j - y)) for (x, y, h) in li):
            print((i, j, H))
            exit()
        else:
            pass

l = []
A = abs
r = list(range(101))
for _ in range(int(eval(input()))):
    (*t,) = list(map(int, input().split()))
    l += [t]
    if t[2]:
        a, b, c = t
for i in r:
    for j in r:
        H = c + A(i - a) + A(j - b)
        if all(h == max(0, H - A(i - x) - A(j - y)) for x, y, h in l):
            print((i, j, H))

-n = int(eval(input())) -_h = 0 -li = [] -for _ in range(n): -    x, y, h = list(map(int, input().split())) -    li.append((x, y, h)) -    if not _h: -        _x, _y, _h = x, y, h -for i in range(101): -    for j in range(101): -        H = _h + abs(i - _x) + abs(j - _y) -        if all(h == max(0, H - abs(i - x) - abs(j - y)) for (x, y, h) in li): +l = [] +A = abs +r = list(range(101)) +for _ in range(int(eval(input()))): +    (*t,) = list(map(int, input().split())) +    l += [t] +    if t[2]: +        a, b, c = t +for i in r: +    for j in r: +        H = c + A(i - a) + A(j - b) +        if all(h == max(0, H - A(i - x) - A(j - y)) for x, y, h in l): -            exit() -        else: -            pass