# solution 2

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)

L = []

for i in range(X):

    for j in range(Y):

        for k in range(Z):

            if (i+1)*(j+1)*(k+1) <= K:

                L.append(A[i]+B[j]+C[k])

            else:

                break

L.sort(reverse=True)

for l in range(K):

    print((L[l]))
# solution 2

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)

L = []

for i in range(X):

    for j in range(Y):

        if (i+1)*(j+1) > K:

            break

        for k in range(Z):

            if (i+1)*(j+1)*(k+1) > K:

                break

            else:

                L.append(A[i] + B[j] + C[k])

L.sort(reverse=True)

for l in range(K):

    print((L[l]))
# solution 2
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)
L = []
for i in range(X):
    for j in range(Y):
        for k in range(Z):
            if (i + 1) * (j + 1) * (k + 1) <= K:
                L.append(A[i] + B[j] + C[k])
            else:
                break
L.sort(reverse=True)
for l in range(K):
    print((L[l]))

# solution 2
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)
L = []
for i in range(X):
    for j in range(Y):
        if (i + 1) * (j + 1) > K:
            break
        for k in range(Z):
            if (i + 1) * (j + 1) * (k + 1) > K:
                break
            else:
                L.append(A[i] + B[j] + C[k])
L.sort(reverse=True)
for l in range(K):
    print((L[l]))

+        if (i + 1) * (j + 1) > K: +            break -            if (i + 1) * (j + 1) * (k + 1) <= K: +            if (i + 1) * (j + 1) * (k + 1) > K: +                break +            else: -            else: -                break