import numpy as np

N = int(eval(input()))



x, y, h = np.array([list(map(int, input().split())) for i in range(N)]).T

"""

x = [0 for i in range(N)]

y = [0 for i in range(N)]

h = [0 for i in range(N)]

for i in range(N):

    x[i], y[i], h[i] = map(int, input().split())

"""

H = 0

Cx = 0

Cy = 0

Flag = True

for i in range(101):

    for j in range(101):

        Flag = True

        for k in range(N):

            if h[k] != 0:

                H = h[k] + abs(i - x[k]) + abs(j - y[k])

                break

        for k in range(N):

            if h[k] != max(H - abs(i - x[k]) - abs(j - y[k]), 0):

                Flag = False

                break

        

        if Flag:

            Cx, Cy = i, j

            break

    if Flag:

        break



print(("{} {} {}".format(Cx, Cy, H)))
import numpy as np

N = int(eval(input()))

"""

x, y, h = np.array([list(map(int, input().split())) for i in range(N)]).T

"""

x = [0 for i in range(N)]

y = [0 for i in range(N)]

h = [0 for i in range(N)]

for i in range(N):

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



H = 0

Cx = 0

Cy = 0

Flag = True

for i in range(101):

    for j in range(101):

        Flag = True

        for k in range(N):

            if h[k] != 0:

                H = h[k] + abs(i - x[k]) + abs(j - y[k])

                break

        for k in range(N):

            if h[k] != max(H - abs(i - x[k]) - abs(j - y[k]), 0):

                Flag = False

                break

        

        if Flag:

            Cx, Cy = i, j

            break

    if Flag:

        break



print(("{} {} {}".format(Cx, Cy, H)))
import numpy as np

N = int(eval(input()))
x, y, h = np.array([list(map(int, input().split())) for i in range(N)]).T
"""
x = [0 for i in range(N)]
y = [0 for i in range(N)]
h = [0 for i in range(N)]
for i in range(N):
    x[i], y[i], h[i] = map(int, input().split())
"""
H = 0
Cx = 0
Cy = 0
Flag = True
for i in range(101):
    for j in range(101):
        Flag = True
        for k in range(N):
            if h[k] != 0:
                H = h[k] + abs(i - x[k]) + abs(j - y[k])
                break
        for k in range(N):
            if h[k] != max(H - abs(i - x[k]) - abs(j - y[k]), 0):
                Flag = False
                break
        if Flag:
            Cx, Cy = i, j
            break
    if Flag:
        break
print(("{} {} {}".format(Cx, Cy, H)))

import numpy as np

N = int(eval(input()))
"""
x, y, h = np.array([list(map(int, input().split())) for i in range(N)]).T
"""
x = [0 for i in range(N)]
y = [0 for i in range(N)]
h = [0 for i in range(N)]
for i in range(N):
    x[i], y[i], h[i] = list(map(int, input().split()))
H = 0
Cx = 0
Cy = 0
Flag = True
for i in range(101):
    for j in range(101):
        Flag = True
        for k in range(N):
            if h[k] != 0:
                H = h[k] + abs(i - x[k]) + abs(j - y[k])
                break
        for k in range(N):
            if h[k] != max(H - abs(i - x[k]) - abs(j - y[k]), 0):
                Flag = False
                break
        if Flag:
            Cx, Cy = i, j
            break
    if Flag:
        break
print(("{} {} {}".format(Cx, Cy, H)))

+""" -    x[i], y[i], h[i] = map(int, input().split()) -""" +    x[i], y[i], h[i] = list(map(int, input().split()))