X, Y, Z, K = [int(x) for x in input().split()]

A = [int(a) for a in input().split()]

B = [int(b) for b in input().split()]

C = [int(c) for c in input().split()]

A = sorted(A, reverse=True)

B = sorted(B, reverse=True)

C = sorted(C, reverse=True)

ABC = []

for a in range(len(A)):

    for b in range(len(B)):

        if (a+1)*(b+1) > K:

            break

        for c in range(len(C)):

            if (a+1)*(c+1) > K:

                break

            elif (b+1)*(c+1) > K:

                break

            elif (a+1)*(b+1)*(c+1) > K:

                break

            ABC.append(A[a] + B[b] + C[c])

ABC = sorted(ABC, reverse=True)

for i in range(K):

    print((ABC[i]))
X, Y, Z, K = [int(x) for x in input().split()]

A = [int(a) for a in input().split()]

B = [int(b) for b in input().split()]

C = [int(c) for c in input().split()]

A = sorted(A, reverse=True)

B = sorted(B, reverse=True)

C = sorted(C, reverse=True)

ABC = []

for a in range(len(A)):

    for b in range(len(B)):

        if (a+1)*(b+1) > K:

            break

        for c in range(len(C)):

            if (a+1)*(b+1)*(c+1) > K:

                break

            ABC.append(A[a] + B[b] + C[c])

ABC = sorted(ABC, reverse=True)

for i in range(K):

    print((ABC[i]))
X, Y, Z, K = [int(x) for x in input().split()]
A = [int(a) for a in input().split()]
B = [int(b) for b in input().split()]
C = [int(c) for c in input().split()]
A = sorted(A, reverse=True)
B = sorted(B, reverse=True)
C = sorted(C, reverse=True)
ABC = []
for a in range(len(A)):
    for b in range(len(B)):
        if (a + 1) * (b + 1) > K:
            break
        for c in range(len(C)):
            if (a + 1) * (c + 1) > K:
                break
            elif (b + 1) * (c + 1) > K:
                break
            elif (a + 1) * (b + 1) * (c + 1) > K:
                break
            ABC.append(A[a] + B[b] + C[c])
ABC = sorted(ABC, reverse=True)
for i in range(K):
    print((ABC[i]))

X, Y, Z, K = [int(x) for x in input().split()]
A = [int(a) for a in input().split()]
B = [int(b) for b in input().split()]
C = [int(c) for c in input().split()]
A = sorted(A, reverse=True)
B = sorted(B, reverse=True)
C = sorted(C, reverse=True)
ABC = []
for a in range(len(A)):
    for b in range(len(B)):
        if (a + 1) * (b + 1) > K:
            break
        for c in range(len(C)):
            if (a + 1) * (b + 1) * (c + 1) > K:
                break
            ABC.append(A[a] + B[b] + C[c])
ABC = sorted(ABC, reverse=True)
for i in range(K):
    print((ABC[i]))

-            if (a + 1) * (c + 1) > K: -                break -            elif (b + 1) * (c + 1) > K: -                break -            elif (a + 1) * (b + 1) * (c + 1) > K: +            if (a + 1) * (b + 1) * (c + 1) > K: