n = int(eval(input()))



arr = []



for i in range(n):

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

    arr.append([x, y, h])



for i in range(101):

    for j in range(101):

        for k in range(n):

            if arr[k][2] > 0:

                len1 = abs(arr[k][0] - i) + abs(arr[k][1] - j)

                ch = len1 + arr[k][2]

                break

            else:

                continue

        for k in range(n):

            lenk = abs(arr[k][0] - i) + abs(arr[k][1] - j)

            if max(ch - lenk, 0) == arr[k][2]:

                if k == n-1:

                    print(("{} {} {}".format(i, j, ch)))

                else:

                    continue

            else:

                break
N = int(eval(input()))



L = []

for i in range(N):

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

    L.append([x, y, h])

    if h != 0:

        idx = i





for i in range(101):

    for j in range(101):

        H = L[idx][2] + abs(L[idx][0]-i) + abs(L[idx][1]-j)

        for k in range(N):

            if L[k][2] == max(H - abs(L[k][0]-i) - abs(L[k][1]-j), 0):

                pass

            else:

                break

            if k == N-1:

                ansx = i

                ansy = j

                ansh = H



print((ansx, ansy, ansh))
n = int(eval(input()))
arr = []
for i in range(n):
    x, y, h = list(map(int, input().split()))
    arr.append([x, y, h])
for i in range(101):
    for j in range(101):
        for k in range(n):
            if arr[k][2] > 0:
                len1 = abs(arr[k][0] - i) + abs(arr[k][1] - j)
                ch = len1 + arr[k][2]
                break
            else:
                continue
        for k in range(n):
            lenk = abs(arr[k][0] - i) + abs(arr[k][1] - j)
            if max(ch - lenk, 0) == arr[k][2]:
                if k == n - 1:
                    print(("{} {} {}".format(i, j, ch)))
                else:
                    continue
            else:
                break

N = int(eval(input()))
L = []
for i in range(N):
    x, y, h = list(map(int, input().split()))
    L.append([x, y, h])
    if h != 0:
        idx = i
for i in range(101):
    for j in range(101):
        H = L[idx][2] + abs(L[idx][0] - i) + abs(L[idx][1] - j)
        for k in range(N):
            if L[k][2] == max(H - abs(L[k][0] - i) - abs(L[k][1] - j), 0):
                pass
            else:
                break
            if k == N - 1:
                ansx = i
                ansy = j
                ansh = H
print((ansx, ansy, ansh))

-n = int(eval(input())) -arr = [] -for i in range(n): +N = int(eval(input())) +L = [] +for i in range(N): -    arr.append([x, y, h]) +    L.append([x, y, h]) +    if h != 0: +        idx = i -        for k in range(n): -            if arr[k][2] > 0: -                len1 = abs(arr[k][0] - i) + abs(arr[k][1] - j) -                ch = len1 + arr[k][2] -                break -            else: -                continue -        for k in range(n): -            lenk = abs(arr[k][0] - i) + abs(arr[k][1] - j) -            if max(ch - lenk, 0) == arr[k][2]: -                if k == n - 1: -                    print(("{} {} {}".format(i, j, ch))) -                else: -                    continue +        H = L[idx][2] + abs(L[idx][0] - i) + abs(L[idx][1] - j) +        for k in range(N): +            if L[k][2] == max(H - abs(L[k][0] - i) - abs(L[k][1] - j), 0): +                pass +            if k == N - 1: +                ansx = i +                ansy = j +                ansh = H +print((ansx, ansy, ansh))