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

*A, = sorted(map(int, input().split()), reverse=True)

*B, = sorted(map(int, input().split()), reverse=True)

*C, = sorted(map(int, input().split()), reverse=True)

AB = [A[x] + B[y] for y in range(Y) for x in range(X)]

AB.sort(reverse=True)

AB = AB[:K]

XY = len(AB)

ABC = [AB[xy] + C[z] for z in range(Z) for xy in range(XY)]

ABC.sort(reverse=True)

for k in range(K):

    print((ABC[k]))

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

*A, = sorted(map(int, input().split()), reverse=True)

*B, = sorted(map(int, input().split()), reverse=True)

*C, = sorted(map(int, input().split()), reverse=True)

AB = [a+b for a in A for b in B]

AB.sort(reverse=True)

AB = AB[:K]

XY = len(AB)

ABC = [ab+c for c in C for ab in AB]

ABC.sort(reverse=True)

ABC = ABC[:K]

for abc in ABC:

    print(abc)

X, Y, Z, K = list(map(int, input().split()))
(*A,) = sorted(map(int, input().split()), reverse=True)
(*B,) = sorted(map(int, input().split()), reverse=True)
(*C,) = sorted(map(int, input().split()), reverse=True)
AB = [A[x] + B[y] for y in range(Y) for x in range(X)]
AB.sort(reverse=True)
AB = AB[:K]
XY = len(AB)
ABC = [AB[xy] + C[z] for z in range(Z) for xy in range(XY)]
ABC.sort(reverse=True)
for k in range(K):
    print((ABC[k]))

X, Y, Z, K = list(map(int, input().split()))
(*A,) = sorted(map(int, input().split()), reverse=True)
(*B,) = sorted(map(int, input().split()), reverse=True)
(*C,) = sorted(map(int, input().split()), reverse=True)
AB = [a + b for a in A for b in B]
AB.sort(reverse=True)
AB = AB[:K]
XY = len(AB)
ABC = [ab + c for c in C for ab in AB]
ABC.sort(reverse=True)
ABC = ABC[:K]
for abc in ABC:
    print(abc)

-AB = [A[x] + B[y] for y in range(Y) for x in range(X)] +AB = [a + b for a in A for b in B] -ABC = [AB[xy] + C[z] for z in range(Z) for xy in range(XY)] +ABC = [ab + c for c in C for ab in AB] -for k in range(K): -    print((ABC[k])) +ABC = ABC[:K] +for abc in ABC: +    print(abc)