X, Y, Z, K=list(map(int, input().split()))

A=list(map(int, input().split()))

B=list(map(int, input().split()))

C=list(map(int, input().split()))

A.sort(reverse=True)

B.sort(reverse=True)

C.sort(reverse=True)



import heapq

nums=[[-(A[0]+B[0]+C[0]), 0, 0, 0]]

heapq.heapify(nums)



sumi=[[0, 0, 0]]

for _ in range(K):

  out, a, b, c=heapq.heappop(nums)

  print((-out))

  if a<X-1 and not([a+1, b, c] in sumi):

    heapq.heappush(nums, [-(A[a+1]+B[b]+C[c]), a+1, b, c])

    sumi.append([a+1, b, c])

  if b<Y-1 and not([a, b+1, c] in sumi):

    heapq.heappush(nums, [-(A[a]+B[b+1]+C[c]), a, b+1, c])

    sumi.append([a, b+1, c])

  if c<Z-1 and not([a, b, c+1] in sumi):

    heapq.heappush(nums, [-(A[a]+B[b]+C[c+1]), a, b, c+1])

    sumi.append([a, b, c+1])

X, Y, Z, K=list(map(int, input().split()))

A=list(map(int, input().split()))

B=list(map(int, input().split()))

C=list(map(int, input().split()))

A.sort(reverse=True)

B.sort(reverse=True)

C.sort(reverse=True)



import heapq

nums=[[-(A[0]+B[0]+C[0]), 0, 0, 0]]

heapq.heapify(nums)



sumi=set()

sumi.add((0, 0, 0))



for _ in range(K):

  out, a, b, c=heapq.heappop(nums)

  print((-out))

  if a<X-1 and not((a+1, b, c) in sumi):

    heapq.heappush(nums, [-(A[a+1]+B[b]+C[c]), a+1, b, c])

    sumi.add((a+1, b, c))

  if b<Y-1 and not((a, b+1, c) in sumi):

    heapq.heappush(nums, [-(A[a]+B[b+1]+C[c]), a, b+1, c])

    sumi.add((a, b+1, c))

  if c<Z-1 and not((a, b, c+1) in sumi):

    heapq.heappush(nums, [-(A[a]+B[b]+C[c+1]), a, b, c+1])

    sumi.add((a, b, c+1))

X, Y, Z, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)
import heapq

nums = [[-(A[0] + B[0] + C[0]), 0, 0, 0]]
heapq.heapify(nums)
sumi = [[0, 0, 0]]
for _ in range(K):
    out, a, b, c = heapq.heappop(nums)
    print((-out))
    if a < X - 1 and not ([a + 1, b, c] in sumi):
        heapq.heappush(nums, [-(A[a + 1] + B[b] + C[c]), a + 1, b, c])
        sumi.append([a + 1, b, c])
    if b < Y - 1 and not ([a, b + 1, c] in sumi):
        heapq.heappush(nums, [-(A[a] + B[b + 1] + C[c]), a, b + 1, c])
        sumi.append([a, b + 1, c])
    if c < Z - 1 and not ([a, b, c + 1] in sumi):
        heapq.heappush(nums, [-(A[a] + B[b] + C[c + 1]), a, b, c + 1])
        sumi.append([a, b, c + 1])

X, Y, Z, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)
import heapq

nums = [[-(A[0] + B[0] + C[0]), 0, 0, 0]]
heapq.heapify(nums)
sumi = set()
sumi.add((0, 0, 0))
for _ in range(K):
    out, a, b, c = heapq.heappop(nums)
    print((-out))
    if a < X - 1 and not ((a + 1, b, c) in sumi):
        heapq.heappush(nums, [-(A[a + 1] + B[b] + C[c]), a + 1, b, c])
        sumi.add((a + 1, b, c))
    if b < Y - 1 and not ((a, b + 1, c) in sumi):
        heapq.heappush(nums, [-(A[a] + B[b + 1] + C[c]), a, b + 1, c])
        sumi.add((a, b + 1, c))
    if c < Z - 1 and not ((a, b, c + 1) in sumi):
        heapq.heappush(nums, [-(A[a] + B[b] + C[c + 1]), a, b, c + 1])
        sumi.add((a, b, c + 1))

-sumi = [[0, 0, 0]] +sumi = set() +sumi.add((0, 0, 0)) -    if a < X - 1 and not ([a + 1, b, c] in sumi): +    if a < X - 1 and not ((a + 1, b, c) in sumi): -        sumi.append([a + 1, b, c]) -    if b < Y - 1 and not ([a, b + 1, c] in sumi): +        sumi.add((a + 1, b, c)) +    if b < Y - 1 and not ((a, b + 1, c) in sumi): -        sumi.append([a, b + 1, c]) -    if c < Z - 1 and not ([a, b, c + 1] in sumi): +        sumi.add((a, b + 1, c)) +    if c < Z - 1 and not ((a, b, c + 1) in sumi): -        sumi.append([a, b, c + 1]) +        sumi.add((a, b, c + 1))