#coding:utf-8

import sys

sys.setrecursionlimit(2**31-1)

input = sys.stdin.readline

write = sys.stdout.write

LMIIS = lambda : list(map(int,input().split()))

II = lambda : int(input())

dbg = lambda *something : print(*something) if DEBUG is True else 0

DEBUG = True



def main():

    X,Y,Z,K = LMIIS()

    A = LMIIS()

    B = LMIIS()

    C = LMIIS()

    

    A.sort(reverse=True)

    B.sort(reverse=True)

    C.sort(reverse=True)

    ans = []

    for ai in range(X):

        for bi in range(Y):

            if ai * bi > K:

                break

            for ci in range(Z):

                if ai * bi * ci > K:

                    break

                

                ans.append(A[ai]+B[bi]+C[ci])

    ans.sort(reverse=True)

    for i in range(K):

        print(ans[i])





    

    





if __name__ == '__main__':

    main()

#coding:utf-8

import sys

sys.setrecursionlimit(2**31-1)

input = sys.stdin.readline

write = sys.stdout.write

LMIIS = lambda : list(map(int,input().split()))

II = lambda : int(input())

dbg = lambda *something : print(*something) if DEBUG is True else 0

DEBUG = True



def main():

    X,Y,Z,K = LMIIS()

    A = LMIIS()

    B = LMIIS()

    C = LMIIS()

    

    A.sort(reverse=True)

    B.sort(reverse=True)

    C.sort(reverse=True)

    from heapq import heappush,heappop

    from collections import defaultdict

    d = defaultdict(lambda:False)

    h = []

    ai = bi = ci = 0

    heappush(h,(-(A[ai]+B[bi]+C[ci]),ai,bi,ci))

    d[(0,0,0)] = True

    for _ in range(K):

        v,ai,bi,ci = heappop(h)

        print(-v)

        if ai+1 < X and d[(ai+1,bi,ci)] == False:

            heappush(h,(-(A[ai+1]+B[bi]+C[ci]),ai+1,bi,ci))

            d[(ai+1,bi,ci)] = True

        if bi+1 < Y and d[(ai,bi+1,ci)] == False:

            heappush(h,(-(A[ai]+B[bi+1]+C[ci]),ai,bi+1,ci))

            d[(ai,bi+1,ci)] = True

        if ci+1 < Z and d[(ai,bi,ci+1)] == False:

            heappush(h,(-(A[ai]+B[bi]+C[ci+1]),ai,bi,ci+1))

            d[(ai,bi,ci+1)] = True





    

    





if __name__ == '__main__':

    main()

# coding:utf-8
import sys

sys.setrecursionlimit(2**31 - 1)
input = sys.stdin.readline
write = sys.stdout.write
LMIIS = lambda: list(map(int, input().split()))
II = lambda: int(input())
dbg = lambda *something: print(*something) if DEBUG is True else 0
DEBUG = True


def main():
    X, Y, Z, K = LMIIS()
    A = LMIIS()
    B = LMIIS()
    C = LMIIS()
    A.sort(reverse=True)
    B.sort(reverse=True)
    C.sort(reverse=True)
    ans = []
    for ai in range(X):
        for bi in range(Y):
            if ai * bi > K:
                break
            for ci in range(Z):
                if ai * bi * ci > K:
                    break
                ans.append(A[ai] + B[bi] + C[ci])
    ans.sort(reverse=True)
    for i in range(K):
        print(ans[i])


if __name__ == "__main__":
    main()

# coding:utf-8
import sys

sys.setrecursionlimit(2**31 - 1)
input = sys.stdin.readline
write = sys.stdout.write
LMIIS = lambda: list(map(int, input().split()))
II = lambda: int(input())
dbg = lambda *something: print(*something) if DEBUG is True else 0
DEBUG = True


def main():
    X, Y, Z, K = LMIIS()
    A = LMIIS()
    B = LMIIS()
    C = LMIIS()
    A.sort(reverse=True)
    B.sort(reverse=True)
    C.sort(reverse=True)
    from heapq import heappush, heappop
    from collections import defaultdict

    d = defaultdict(lambda: False)
    h = []
    ai = bi = ci = 0
    heappush(h, (-(A[ai] + B[bi] + C[ci]), ai, bi, ci))
    d[(0, 0, 0)] = True
    for _ in range(K):
        v, ai, bi, ci = heappop(h)
        print(-v)
        if ai + 1 < X and d[(ai + 1, bi, ci)] == False:
            heappush(h, (-(A[ai + 1] + B[bi] + C[ci]), ai + 1, bi, ci))
            d[(ai + 1, bi, ci)] = True
        if bi + 1 < Y and d[(ai, bi + 1, ci)] == False:
            heappush(h, (-(A[ai] + B[bi + 1] + C[ci]), ai, bi + 1, ci))
            d[(ai, bi + 1, ci)] = True
        if ci + 1 < Z and d[(ai, bi, ci + 1)] == False:
            heappush(h, (-(A[ai] + B[bi] + C[ci + 1]), ai, bi, ci + 1))
            d[(ai, bi, ci + 1)] = True


if __name__ == "__main__":
    main()

-    ans = [] -    for ai in range(X): -        for bi in range(Y): -            if ai * bi > K: -                break -            for ci in range(Z): -                if ai * bi * ci > K: -                    break -                ans.append(A[ai] + B[bi] + C[ci]) -    ans.sort(reverse=True) -    for i in range(K): -        print(ans[i]) +    from heapq import heappush, heappop +    from collections import defaultdict + +    d = defaultdict(lambda: False) +    h = [] +    ai = bi = ci = 0 +    heappush(h, (-(A[ai] + B[bi] + C[ci]), ai, bi, ci)) +    d[(0, 0, 0)] = True +    for _ in range(K): +        v, ai, bi, ci = heappop(h) +        print(-v) +        if ai + 1 < X and d[(ai + 1, bi, ci)] == False: +            heappush(h, (-(A[ai + 1] + B[bi] + C[ci]), ai + 1, bi, ci)) +            d[(ai + 1, bi, ci)] = True +        if bi + 1 < Y and d[(ai, bi + 1, ci)] == False: +            heappush(h, (-(A[ai] + B[bi + 1] + C[ci]), ai, bi + 1, ci)) +            d[(ai, bi + 1, ci)] = True +        if ci + 1 < Z and d[(ai, bi, ci + 1)] == False: +            heappush(h, (-(A[ai] + B[bi] + C[ci + 1]), ai, bi, ci + 1)) +            d[(ai, bi, ci + 1)] = True