X, Y, Z, K = map(int, input().split(' '))
A = sorted(list(map(int, input().split(' '))), reverse=True)
B = sorted(list(map(int, input().split(' '))), reverse=True)
C = sorted(list(map(int, input().split(' '))), reverse=True)
import heapq
# 合計値, a_idx, b_idx, c_idx
queue = [(-(A[0] + B[0] + C[0]), 0, 0, 0)]
# heapqueueにqueueをかえる
heapq.heapify(queue)
visited = set()
i = 0
for i in range(K):
while True:
v, a, b, c = heapq.heappop(queue) # 候補の中から1番目が一番小さいtupleを取り出す
if (a, b, c) not in visited:
break
visited.add((a, b, c))
print(-v)
if a < X - 1:
heapq.heappush(queue, (-(A[a + 1] + B[b] + C[c]), a + 1, b, c))
if b < Y - 1:
heapq.heappush(queue, (-(A[a] + B[b + 1] + C[c]), a, b + 1, c))
if c < Z - 1:
heapq.heappush(queue, (-(A[a] + B[b] + C[c + 1]), a, b, c + 1))