n = int(eval(input()))

HXY = []

for i in range(n):

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

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



HXY.sort(reverse=True)



for i in range(101):

    for j in range(101):

        H = -1

        for k in range(n):

            h, x, y = HXY[k]

            if h > 0:

                temp = h + abs(x-i) + abs(y-j)

                if H > 0:

                    if H != temp:

                        break

                else:

                    H = temp

            else:

                if H - abs(x-i) - abs(y-j) > 0:

                    break

        else:

            if H > 0:

                print((i, j, H))

n = int(eval(input()))

XYH = []

for i in range(n):

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

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



XYH.sort(reverse=True)





for i in range(101):

    for j in range(101):

        H = -1

        flag = True

        for k in range(n):

            h, x, y = XYH[k]

            if H == -1:

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

            else:

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

                    flag = False

        if flag:

            print((i, j, H))

            exit()

n = int(eval(input()))
HXY = []
for i in range(n):
    x, y, h = list(map(int, input().split()))
    HXY.append((h, x, y))
HXY.sort(reverse=True)
for i in range(101):
    for j in range(101):
        H = -1
        for k in range(n):
            h, x, y = HXY[k]
            if h > 0:
                temp = h + abs(x - i) + abs(y - j)
                if H > 0:
                    if H != temp:
                        break
                else:
                    H = temp
            else:
                if H - abs(x - i) - abs(y - j) > 0:
                    break
        else:
            if H > 0:
                print((i, j, H))

n = int(eval(input()))
XYH = []
for i in range(n):
    x, y, h = list(map(int, input().split()))
    XYH.append((h, x, y))
XYH.sort(reverse=True)
for i in range(101):
    for j in range(101):
        H = -1
        flag = True
        for k in range(n):
            h, x, y = XYH[k]
            if H == -1:
                H = abs(x - i) + abs(y - j) + h
            else:
                if max(H - abs(x - i) - abs(y - j), 0) != h:
                    flag = False
        if flag:
            print((i, j, H))
            exit()

-HXY = [] +XYH = [] -    HXY.append((h, x, y)) -HXY.sort(reverse=True) +    XYH.append((h, x, y)) +XYH.sort(reverse=True) +        flag = True -            h, x, y = HXY[k] -            if h > 0: -                temp = h + abs(x - i) + abs(y - j) -                if H > 0: -                    if H != temp: -                        break -                else: -                    H = temp +            h, x, y = XYH[k] +            if H == -1: +                H = abs(x - i) + abs(y - j) + h -                if H - abs(x - i) - abs(y - j) > 0: -                    break -        else: -            if H > 0: -                print((i, j, H)) +                if max(H - abs(x - i) - abs(y - j), 0) != h: +                    flag = False +        if flag: +            print((i, j, H)) +            exit()