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

ab=[]

for i in range(x):

    for j in range(y):

        ab.append(a[i]+b[j])

ab.sort(key=lambda x: -x)

c.sort(key=lambda x: -x)

ans=[]

ct=[0]

ansc=[ab[0]+c[0]]

while (len(ans)<k):

    if(ct[-1]!=0 and len(ct)<z):

        ansc+=[ab[0]+c[len(ct)]]

        ct+=[0]

    ans+=[max(ansc)]

    tmp=ansc.index(max(ansc))

    if(ct[tmp]==len(ab)-1):

        ansc[tmp]=0

    else:

        ct[tmp]+=1

        ansc[tmp]=ab[ct[tmp]]+c[tmp]

for i in ans:

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

ab=[i+j for i in a for j in b]

ab.sort(key=lambda x: -x)

c.sort(key=lambda x: -x)

ans=[]

ct=[0]

ansc=[ab[0]+c[0]]

while (len(ans)<k):

    if(ct[-1]!=0 and len(ct)<z):

        ansc+=[ab[0]+c[len(ct)]]

        ct+=[0]

    ans+=[max(ansc)]

    tmp=ansc.index(max(ansc))

    if(ct[tmp]==len(ab)-1):

        ansc[tmp]=0

    else:

        ct[tmp]+=1

        ansc[tmp]=ab[ct[tmp]]+c[tmp]

for i in ans:

    print(i)
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()))
ab = []
for i in range(x):
    for j in range(y):
        ab.append(a[i] + b[j])
ab.sort(key=lambda x: -x)
c.sort(key=lambda x: -x)
ans = []
ct = [0]
ansc = [ab[0] + c[0]]
while len(ans) < k:
    if ct[-1] != 0 and len(ct) < z:
        ansc += [ab[0] + c[len(ct)]]
        ct += [0]
    ans += [max(ansc)]
    tmp = ansc.index(max(ansc))
    if ct[tmp] == len(ab) - 1:
        ansc[tmp] = 0
    else:
        ct[tmp] += 1
        ansc[tmp] = ab[ct[tmp]] + c[tmp]
for i in ans:
    print(i)

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()))
ab = [i + j for i in a for j in b]
ab.sort(key=lambda x: -x)
c.sort(key=lambda x: -x)
ans = []
ct = [0]
ansc = [ab[0] + c[0]]
while len(ans) < k:
    if ct[-1] != 0 and len(ct) < z:
        ansc += [ab[0] + c[len(ct)]]
        ct += [0]
    ans += [max(ansc)]
    tmp = ansc.index(max(ansc))
    if ct[tmp] == len(ab) - 1:
        ansc[tmp] = 0
    else:
        ct[tmp] += 1
        ansc[tmp] = ab[ct[tmp]] + c[tmp]
for i in ans:
    print(i)

-ab = [] -for i in range(x): -    for j in range(y): -        ab.append(a[i] + b[j]) +ab = [i + j for i in a for j in b]