def int_raw():

    return int(eval(input()))



def ss_raw():

    return input().split()



def ints_raw():

    return list(map(int,ss_raw()))



X,Y,Z,K = ints_raw()



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)

def main():

    D = []

    for a in A:

        for b in B:

            D.append(a+b)

    D.sort(reverse=True)

    D = D[:K+1]

    E =[]

    for d in D:

        for c in C:

            E.append(d+c)

    E.sort(reverse=True)

    for e in range(K):

        print((E[e]))



main()

def int_raw():

    return int(eval(input()))



def ss_raw():

    return input().split()



def ints_raw():

    return list(map(int,ss_raw()))



X,Y,Z,K = ints_raw()



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)

def main():

    D = [a+b for a in A for b in B]

    D.sort(reverse=True)

    D = D[:K+1]

    E =[d+c for d in D for c in C]

    E.sort(reverse=True)

    for e in range(K):

        print((E[e]))



main()

def int_raw():
    return int(eval(input()))


def ss_raw():
    return input().split()


def ints_raw():
    return list(map(int, ss_raw()))


X, Y, Z, K = ints_raw()
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)


def main():
    D = []
    for a in A:
        for b in B:
            D.append(a + b)
    D.sort(reverse=True)
    D = D[: K + 1]
    E = []
    for d in D:
        for c in C:
            E.append(d + c)
    E.sort(reverse=True)
    for e in range(K):
        print((E[e]))


main()

def int_raw():
    return int(eval(input()))


def ss_raw():
    return input().split()


def ints_raw():
    return list(map(int, ss_raw()))


X, Y, Z, K = ints_raw()
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)


def main():
    D = [a + b for a in A for b in B]
    D.sort(reverse=True)
    D = D[: K + 1]
    E = [d + c for d in D for c in C]
    E.sort(reverse=True)
    for e in range(K):
        print((E[e]))


main()

-    D = [] -    for a in A: -        for b in B: -            D.append(a + b) +    D = [a + b for a in A for b in B] -    E = [] -    for d in D: -        for c in C: -            E.append(d + c) +    E = [d + c for d in D for c in C]