# https://img.atcoder.jp/abc123/editorial.pdf

# 問題D: Cake 123 解法 #2 - 「ある条件」を満たす最大106307通りを全部ソート



def solve(X, Y, Z, K, A, B, C):

    A.sort(reverse=True)

    B.sort(reverse=True)

    C.sort(reverse=True)



    ABC = []

    for i1, a in enumerate(A, start=1):

       for i2, b in enumerate(B, start=1):

           for i3, c in enumerate(C, start=1):

               if i1 * i2 * i3 <= K:

                   ABC.append(a + b + c)

               else:

                   break

    ABC.sort(reverse=True)

    ABC = ABC[:K]



    print(("\n".join(map(str, ABC))))



if __name__ == "__main__":

    X, Y, Z, K = list(map(int, input().split()))

    A = list(map(int, input().split()))

    B = list(map(int, input().split()))

    C = list(map(int, input().split()))

    solve(X, Y, Z, K, A, B, C)
# https://img.atcoder.jp/abc123/editorial.pdf

# 問題D: Cake 123 解法 #3 - さらに高速な解法、priority-queue を用いて O(K log K)



from heapq import heappush, heappop



def solve(X, Y, Z, K, A, B, C):

    def append(cand_a, cand_b, cand_c):

        cand_key = (cand_a, cand_b, cand_c)

        if not cand_key in pushedQ \

                and cand_a < len(A) \

                and cand_b < len(B) \

                and cand_c < len(C):

            yum = A[cand_a] + B[cand_b] + C[cand_c]

            heappush(Q, (-yum, cand_key))

            pushedQ.append(cand_key)



    A.sort(reverse=True)

    B.sort(reverse=True)

    C.sort(reverse=True)



    Q = []

    a = 0

    b = 0

    c = 0

    yum = A[a] + B[b] + C[c]

    heappush(Q, (-yum, (a, b, c)))

    pushedQ = [(a, b, c)]



    for _ in range(K):

#       print(Q)

        max_q = heappop(Q)

        max_yum, max_key = max_q[0] * (-1), max_q[1]

        a, b, c = max_key

        print(max_yum)

        append(a+1, b, c)

        append(a, b+1, c)

        append(a, b, c+1)



if __name__ == "__main__":

    X, Y, Z, K = list(map(int, input().split()))

    A = list(map(int, input().split()))

    B = list(map(int, input().split()))

    C = list(map(int, input().split()))

    solve(X, Y, Z, K, A, B, C)

# https://img.atcoder.jp/abc123/editorial.pdf
# 問題D: Cake 123 解法 #2 - 「ある条件」を満たす最大106307通りを全部ソート
def solve(X, Y, Z, K, A, B, C):
    A.sort(reverse=True)
    B.sort(reverse=True)
    C.sort(reverse=True)
    ABC = []
    for i1, a in enumerate(A, start=1):
        for i2, b in enumerate(B, start=1):
            for i3, c in enumerate(C, start=1):
                if i1 * i2 * i3 <= K:
                    ABC.append(a + b + c)
                else:
                    break
    ABC.sort(reverse=True)
    ABC = ABC[:K]
    print(("\n".join(map(str, ABC))))


if __name__ == "__main__":
    X, Y, Z, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    C = list(map(int, input().split()))
    solve(X, Y, Z, K, A, B, C)

# https://img.atcoder.jp/abc123/editorial.pdf
# 問題D: Cake 123 解法 #3 - さらに高速な解法、priority-queue を用いて O(K log K)
from heapq import heappush, heappop


def solve(X, Y, Z, K, A, B, C):
    def append(cand_a, cand_b, cand_c):
        cand_key = (cand_a, cand_b, cand_c)
        if (
            not cand_key in pushedQ
            and cand_a < len(A)
            and cand_b < len(B)
            and cand_c < len(C)
        ):
            yum = A[cand_a] + B[cand_b] + C[cand_c]
            heappush(Q, (-yum, cand_key))
            pushedQ.append(cand_key)

    A.sort(reverse=True)
    B.sort(reverse=True)
    C.sort(reverse=True)
    Q = []
    a = 0
    b = 0
    c = 0
    yum = A[a] + B[b] + C[c]
    heappush(Q, (-yum, (a, b, c)))
    pushedQ = [(a, b, c)]
    for _ in range(K):
        #       print(Q)
        max_q = heappop(Q)
        max_yum, max_key = max_q[0] * (-1), max_q[1]
        a, b, c = max_key
        print(max_yum)
        append(a + 1, b, c)
        append(a, b + 1, c)
        append(a, b, c + 1)


if __name__ == "__main__":
    X, Y, Z, K = list(map(int, input().split()))
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    C = list(map(int, input().split()))
    solve(X, Y, Z, K, A, B, C)

-# 問題D: Cake 123 解法 #2 - 「ある条件」を満たす最大106307通りを全部ソート +# 問題D: Cake 123 解法 #3 - さらに高速な解法、priority-queue を用いて O(K log K) +from heapq import heappush, heappop + + +    def append(cand_a, cand_b, cand_c): +        cand_key = (cand_a, cand_b, cand_c) +        if ( +            not cand_key in pushedQ +            and cand_a < len(A) +            and cand_b < len(B) +            and cand_c < len(C) +        ): +            yum = A[cand_a] + B[cand_b] + C[cand_c] +            heappush(Q, (-yum, cand_key)) +            pushedQ.append(cand_key) + -    ABC = [] -    for i1, a in enumerate(A, start=1): -        for i2, b in enumerate(B, start=1): -            for i3, c in enumerate(C, start=1): -                if i1 * i2 * i3 <= K: -                    ABC.append(a + b + c) -                else: -                    break -    ABC.sort(reverse=True) -    ABC = ABC[:K] -    print(("\n".join(map(str, ABC)))) +    Q = [] +    a = 0 +    b = 0 +    c = 0 +    yum = A[a] + B[b] + C[c] +    heappush(Q, (-yum, (a, b, c))) +    pushedQ = [(a, b, c)] +    for _ in range(K): +        #       print(Q) +        max_q = heappop(Q) +        max_yum, max_key = max_q[0] * (-1), max_q[1] +        a, b, c = max_key +        print(max_yum) +        append(a + 1, b, c) +        append(a, b + 1, c) +        append(a, b, c + 1)