import sys



if __name__ == "__main__":

    (X, Y, Z, K) = list(map(int, sys.stdin.readline().split()))

    A = list(map(int, sys.stdin.readline().split()))

    B = list(map(int, sys.stdin.readline().split()))

    C = list(map(int, sys.stdin.readline().split()))



    v = []

    for a in A:

        for b in B:

            v.append(a + b)



    v.sort(reverse=True)



    ans = []

    for i in range(min(len(v),3000)):

        for c in C:

            ans.append(v[i] + c)



    ans.sort(reverse=True)



    for i in range(K):

        sys.stdout.write("%d\n" % ans[i])
import sys



if __name__ == "__main__":

    (X, Y, Z, K) = list(map(int, sys.stdin.readline().split()))

    A = list(map(int, sys.stdin.readline().split()))

    B = list(map(int, sys.stdin.readline().split()))

    C = list(map(int, sys.stdin.readline().split()))



    A.sort(reverse=True)

    B.sort(reverse=True)

    C.sort(reverse=True)

    v = []

    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

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



    v.sort(reverse=True)



    for i in range(K):

        sys.stdout.write("%d\n" % v[i])
import sys

if __name__ == "__main__":
    (X, Y, Z, K) = list(map(int, sys.stdin.readline().split()))
    A = list(map(int, sys.stdin.readline().split()))
    B = list(map(int, sys.stdin.readline().split()))
    C = list(map(int, sys.stdin.readline().split()))
    v = []
    for a in A:
        for b in B:
            v.append(a + b)
    v.sort(reverse=True)
    ans = []
    for i in range(min(len(v), 3000)):
        for c in C:
            ans.append(v[i] + c)
    ans.sort(reverse=True)
    for i in range(K):
        sys.stdout.write("%d\n" % ans[i])

import sys

if __name__ == "__main__":
    (X, Y, Z, K) = list(map(int, sys.stdin.readline().split()))
    A = list(map(int, sys.stdin.readline().split()))
    B = list(map(int, sys.stdin.readline().split()))
    C = list(map(int, sys.stdin.readline().split()))
    A.sort(reverse=True)
    B.sort(reverse=True)
    C.sort(reverse=True)
    v = []
    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
                v.append(A[a] + B[b] + C[c])
    v.sort(reverse=True)
    for i in range(K):
        sys.stdout.write("%d\n" % v[i])

+    A.sort(reverse=True) +    B.sort(reverse=True) +    C.sort(reverse=True) -    for a in A: -        for b in B: -            v.append(a + b) +    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 +                v.append(A[a] + B[b] + C[c]) -    ans = [] -    for i in range(min(len(v), 3000)): -        for c in C: -            ans.append(v[i] + c) -    ans.sort(reverse=True) -        sys.stdout.write("%d\n" % ans[i]) +        sys.stdout.write("%d\n" % v[i])