from collections import Counter,defaultdict,deque

from heapq import heapify,heappop,heappush

import sys,bisect,math,itertools,string,queue

sys.setrecursionlimit(10**8)

mod = 10**9+7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))



x,y,z,k = inpl()

a = inpl()

b = inpl()

c = inpl()

ab = []

for i in a:

    for j in b:

        ab.append(i+j)

ab.sort(reverse=True)

A = min(x*y,k)

res = []

# print(ab,c)

for i in range(A):

    for j in range(z):

        res.append(ab[i]+c[j])

res.sort(reverse=True)

for i in range(k):

    print((res[i]))

from collections import Counter,defaultdict,deque

from heapq import heappop,heappush

from bisect import bisect_left,bisect_right 

import sys,math,itertools,fractions,pprint

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))



x,y,z,k = inpl()

a = inpl()

b = inpl()

c = inpl()

ab = []

for s in a:

    for t in b:

        ab.append(s+t)

ab.sort(reverse = True)

ab = ab[:3000]

abc = []

for s in ab:

    for j in c:

        abc.append(s+j)

abc.sort(reverse = True)

print((*abc[:k]))

from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush
import sys, bisect, math, itertools, string, queue

sys.setrecursionlimit(10**8)
mod = 10**9 + 7


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


def inpl_str():
    return list(sys.stdin.readline().split())


def inpln(n):
    return list(int(sys.stdin.readline()) for i in range(n))


x, y, z, k = inpl()
a = inpl()
b = inpl()
c = inpl()
ab = []
for i in a:
    for j in b:
        ab.append(i + j)
ab.sort(reverse=True)
A = min(x * y, k)
res = []
# print(ab,c)
for i in range(A):
    for j in range(z):
        res.append(ab[i] + c[j])
res.sort(reverse=True)
for i in range(k):
    print((res[i]))

from collections import Counter, defaultdict, deque
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
import sys, math, itertools, fractions, pprint

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


x, y, z, k = inpl()
a = inpl()
b = inpl()
c = inpl()
ab = []
for s in a:
    for t in b:
        ab.append(s + t)
ab.sort(reverse=True)
ab = ab[:3000]
abc = []
for s in ab:
    for j in c:
        abc.append(s + j)
abc.sort(reverse=True)
print((*abc[:k]))

-from heapq import heapify, heappop, heappush -import sys, bisect, math, itertools, string, queue +from heapq import heappop, heappush +from bisect import bisect_left, bisect_right +import sys, math, itertools, fractions, pprint +INF = float("inf") -def inpl_str(): -    return list(sys.stdin.readline().split()) - - -def inpln(n): -    return list(int(sys.stdin.readline()) for i in range(n)) - - -for i in a: -    for j in b: -        ab.append(i + j) +for s in a: +    for t in b: +        ab.append(s + t) -A = min(x * y, k) -res = [] -# print(ab,c) -for i in range(A): -    for j in range(z): -        res.append(ab[i] + c[j]) -res.sort(reverse=True) -for i in range(k): -    print((res[i])) +ab = ab[:3000] +abc = [] +for s in ab: +    for j in c: +        abc.append(s + j) +abc.sort(reverse=True) +print((*abc[:k]))