#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()

    



    AB = []

    for a in A:

        for b in B:

            AB.append(a+b)

    

    AB.sort(reverse=True)



    ABC = []

    for ab in AB[:K]:

        for c in C:

            ABC.append(ab+c)

    ABC.sort(reverse=True)

    for i in range(K):

        print(ABC[i])



    pass

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()
    AB = []
    for a in A:
        for b in B:
            AB.append(a + b)
    AB.sort(reverse=True)
    ABC = []
    for ab in AB[:K]:
        for c in C:
            ABC.append(ab + c)
    ABC.sort(reverse=True)
    for i in range(K):
        print(ABC[i])
    pass


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()

-    AB = [] -    for a in A: -        for b in B: -            AB.append(a + b) -    AB.sort(reverse=True) -    ABC = [] -    for ab in AB[:K]: -        for c in C: -            ABC.append(ab + c) -    ABC.sort(reverse=True) +    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) -        print(ABC[i]) -    pass +        print(ans[i])