import sys

sys.setrecursionlimit(2147483647)

INF=float("inf")

MOD=10**9+7

input=lambda :sys.stdin.readline().rstrip()

def resolve():

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

    S=[]

    T=[]

    from itertools import product

    for a,b in product(A,B):

        S.append(a+b)

    S.sort(reverse=1)

    S=S[:k]

    for s,c in product(S,C):

        T.append(s+c)

    T.sort(reverse=1)

    for i in range(k):

        print((T[i]))

resolve()
import sys

sys.setrecursionlimit(2147483647)

INF=float("inf")

MOD=10**9+7

input=lambda :sys.stdin.readline().rstrip()

def resolve():

    x,y,z,K=list(map(int,input().split()))

    A=sorted(map(int,input().split()),reverse=1)

    B=sorted(map(int,input().split()),reverse=1)

    C=sorted(map(int,input().split()),reverse=1)



    # 1<=i<=x,1<=j<=y,1<=k<=z のうち、ijk<=Kを全て取得する

    from itertools import product

    ind=[]

    for i in range(1,x+1):

        if(i>K): break

        for j in range(1,y+1):

            if(i*j>K): break

            for k in range(1,z+1):

                if(i*j*k>K): break

                ind.append((i-1,j-1,k-1))



    S=[]

    for i,j,k in ind:

        S.append(A[i]+B[j]+C[k])

    S.sort(reverse=1)

    for i in range(K):

        print((S[i]))



resolve()
import sys

sys.setrecursionlimit(2147483647)
INF = float("inf")
MOD = 10**9 + 7
input = lambda: sys.stdin.readline().rstrip()


def resolve():
    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()))
    S = []
    T = []
    from itertools import product

    for a, b in product(A, B):
        S.append(a + b)
    S.sort(reverse=1)
    S = S[:k]
    for s, c in product(S, C):
        T.append(s + c)
    T.sort(reverse=1)
    for i in range(k):
        print((T[i]))


resolve()

import sys

sys.setrecursionlimit(2147483647)
INF = float("inf")
MOD = 10**9 + 7
input = lambda: sys.stdin.readline().rstrip()


def resolve():
    x, y, z, K = list(map(int, input().split()))
    A = sorted(map(int, input().split()), reverse=1)
    B = sorted(map(int, input().split()), reverse=1)
    C = sorted(map(int, input().split()), reverse=1)
    # 1<=i<=x,1<=j<=y,1<=k<=z のうち、ijk<=Kを全て取得する
    from itertools import product

    ind = []
    for i in range(1, x + 1):
        if i > K:
            break
        for j in range(1, y + 1):
            if i * j > K:
                break
            for k in range(1, z + 1):
                if i * j * k > K:
                    break
                ind.append((i - 1, j - 1, k - 1))
    S = []
    for i, j, k in ind:
        S.append(A[i] + B[j] + C[k])
    S.sort(reverse=1)
    for i in range(K):
        print((S[i]))


resolve()

-    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())) -    S = [] -    T = [] +    x, y, z, K = list(map(int, input().split())) +    A = sorted(map(int, input().split()), reverse=1) +    B = sorted(map(int, input().split()), reverse=1) +    C = sorted(map(int, input().split()), reverse=1) +    # 1<=i<=x,1<=j<=y,1<=k<=z のうち、ijk<=Kを全て取得する -    for a, b in product(A, B): -        S.append(a + b) +    ind = [] +    for i in range(1, x + 1): +        if i > K: +            break +        for j in range(1, y + 1): +            if i * j > K: +                break +            for k in range(1, z + 1): +                if i * j * k > K: +                    break +                ind.append((i - 1, j - 1, k - 1)) +    S = [] +    for i, j, k in ind: +        S.append(A[i] + B[j] + C[k]) -    S = S[:k] -    for s, c in product(S, C): -        T.append(s + c) -    T.sort(reverse=1) -    for i in range(k): -        print((T[i])) +    for i in range(K): +        print((S[i]))