N = int(eval(input()))

XYH = [list(map(int, input().split())) for _ in range(N)]



for cy in range(101):

	for cx in range(101):

		ch = None

		for x, y, h in XYH:

			if 0 == h:

				continue

			dy, dx = abs(y - cy), abs(x - cx)

			ch = h + dy + dx

		if all([h == max(0, ch - abs(y - cy) - abs(x - cx)) for x, y, h in XYH]):

			print((cx, cy, ch))

			exit()

N = int(eval(input()))

XYH = [list(map(int, input().split())) for _ in range(N)]



for cx in range(101):

	for cy in range(101):

		ch = None

		for x, y, h in XYH:

			if 0 < h:

				ch = h + abs(x - cx) + abs(y - cy)

				if 0 < ch:

					break

		else:

			continue

		for x, y, h in XYH:

			th = max(0, ch - abs(x - cx) - abs(y - cy))

			if th != h:

				break

		else:

			print((cx, cy, ch))

			exit()

N = int(eval(input()))
XYH = [list(map(int, input().split())) for _ in range(N)]
for cy in range(101):
    for cx in range(101):
        ch = None
        for x, y, h in XYH:
            if 0 == h:
                continue
            dy, dx = abs(y - cy), abs(x - cx)
            ch = h + dy + dx
        if all([h == max(0, ch - abs(y - cy) - abs(x - cx)) for x, y, h in XYH]):
            print((cx, cy, ch))
            exit()

N = int(eval(input()))
XYH = [list(map(int, input().split())) for _ in range(N)]
for cx in range(101):
    for cy in range(101):
        ch = None
        for x, y, h in XYH:
            if 0 < h:
                ch = h + abs(x - cx) + abs(y - cy)
                if 0 < ch:
                    break
        else:
            continue
        for x, y, h in XYH:
            th = max(0, ch - abs(x - cx) - abs(y - cy))
            if th != h:
                break
        else:
            print((cx, cy, ch))
            exit()

-for cy in range(101): -    for cx in range(101): +for cx in range(101): +    for cy in range(101): -            if 0 == h: -                continue -            dy, dx = abs(y - cy), abs(x - cx) -            ch = h + dy + dx -        if all([h == max(0, ch - abs(y - cy) - abs(x - cx)) for x, y, h in XYH]): +            if 0 < h: +                ch = h + abs(x - cx) + abs(y - cy) +                if 0 < ch: +                    break +        else: +            continue +        for x, y, h in XYH: +            th = max(0, ch - abs(x - cx) - abs(y - cy)) +            if th != h: +                break +        else: