N = int(eval(input()))

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

C_x = list(range(101))

C_y = list(range(101))

 

if sum([h for _, _, h in X]) == 1:

  for x, y, h in X:

    if h != 0:

      print((x, y, h))

else:

  for px in C_x:

    for py in C_y:

      h_list = [abs(x - px) + abs(y - py) + h for x, y, h in X if h > 0]

      if len(set(h_list)) == 1:

        print((px, py, h_list[0]))

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

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

X.sort(key=lambda x: x[2])

a, b, c = X[-1]



for px in range(101):

    for py in range(101):

      H = abs(a - px) + abs(b - py) + c

      if all(h == max(H - abs(x - px) - abs(y - py), 0) for x, y, h in X):

        print((px, py, H))

        break

N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
C_x = list(range(101))
C_y = list(range(101))
if sum([h for _, _, h in X]) == 1:
    for x, y, h in X:
        if h != 0:
            print((x, y, h))
else:
    for px in C_x:
        for py in C_y:
            h_list = [abs(x - px) + abs(y - py) + h for x, y, h in X if h > 0]
            if len(set(h_list)) == 1:
                print((px, py, h_list[0]))
                break

N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
X.sort(key=lambda x: x[2])
a, b, c = X[-1]
for px in range(101):
    for py in range(101):
        H = abs(a - px) + abs(b - py) + c
        if all(h == max(H - abs(x - px) - abs(y - py), 0) for x, y, h in X):
            print((px, py, H))
            break

-C_x = list(range(101)) -C_y = list(range(101)) -if sum([h for _, _, h in X]) == 1: -    for x, y, h in X: -        if h != 0: -            print((x, y, h)) -else: -    for px in C_x: -        for py in C_y: -            h_list = [abs(x - px) + abs(y - py) + h for x, y, h in X if h > 0] -            if len(set(h_list)) == 1: -                print((px, py, h_list[0])) -                break +X.sort(key=lambda x: x[2]) +a, b, c = X[-1] +for px in range(101): +    for py in range(101): +        H = abs(a - px) + abs(b - py) + c +        if all(h == max(H - abs(x - px) - abs(y - py), 0) for x, y, h in X): +            print((px, py, H)) +            break