# Original solution
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(eval(input()))
def MI(): return list(map(int, input().split()))
def LI(): return list(map(int, input().split()))
def LI2(): return [int(eval(input())) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print(('\n'.join(x)))
def printni(x): print(('\n'.join(list(map(str,x)))))
inf = 10**17
mod = 10**9 + 7

def main():
    x,y,z,k=MI()
    A=sorted(LI(),reverse=True)
    B=sorted(LI(),reverse=True)
    C=sorted(LI(),reverse=True)
    Q=[[(A[0]+B[0]+C[0])*(-1),0,0,0]]
    heapify(Q)
    #print(Q)
    i=0
    ans=[]
    #print(heappop(Q))
    #al=[[[-1]*x for i in range(y)] for j in range(z)]
    #al[0][0][0]=0
    xl,yl,zl=0,0,0
    al=[]
    al=[[0,0,0]]
    while i<k:
        #print(Q)
        if not Q:
            sys.exit()
        a,u,v,w=heappop(Q)
        ans.append(-a)
        i+=1
        if u+1<x and (not ([u+1,v,w] in al)):
            heappush(Q,[-A[u+1]-B[v]-C[w],u+1,v,w])
            al.append([u+1,v,w])
            
            #al[u+1][v][w]=0
        if v+1<y and not([u,v+1,w] in al):
            heappush(Q,[-A[u]-B[v+1]-C[w],u,v+1,w])
            al.append([u,v+1,w])
            #al[u][v+1][w]=0
        if w+1<z and not([u,v,w+1] in al):
            heappush(Q,[-A[u]-B[v]-C[w+1],u,v,w+1])
            al.append([u,v,w+1])
    #print(len(ans))
    for i in range(k):
        print((ans[i]))
if __name__=="__main__":
    main()
    

    
    


# Optimized solution
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(eval(input()))
def MI(): return list(map(int, input().split()))
def LI(): return list(map(int, input().split()))
def LI2(): return [int(eval(input())) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print(('\n'.join(x)))
def printni(x): print(('\n'.join(list(map(str,x)))))
inf = 10**17
mod = 10**9 + 7

def main():
    x,y,z,k=MI()
    set_=set()
    A=sorted(LI(),reverse=True)
    B=sorted(LI(),reverse=True)
    C=sorted(LI(),reverse=True)
    Q=[[(A[0]+B[0]+C[0])*(-1),0,0,0]]
    heapify(Q)
    set_.add((0,0,0))
    #print(Q)
    i=0
    ans=[]
    #print(heappop(Q))
    #al=[[[-1]*x for i in range(y)] for j in range(z)]
    #al[0][0][0]=0
    xl,yl,zl=0,0,0
    al=[]
    al=[[0,0,0]]
    while i<k:
        #print(Q)
        a,u,v,w=heappop(Q)
        ans.append([-a,u,v,w])
        print((-a))
        i+=1
        if u+1<x and (u+1,v,w) not in set_:
            heappush(Q,[-A[u+1]-B[v]-C[w],u+1,v,w])
            set_.add((u+1,v,w))
            #al.append([u+1,v,w])
            
            #al[u+1][v][w]=0
        if v+1<y and (u,v+1,w) not in set_:
            heappush(Q,[-A[u]-B[v+1]-C[w],u,v+1,w])
            set_.add((u,v+1,w))
            #al.append([u,v+1,w])
            #al[u][v+1][w]=0
        if w+1<z and (u,v,w+1) not in set_:
            heappush(Q,[-A[u]-B[v]-C[w+1],u,v,w+1])
            set_.add((u,v,w+1))
            #al.append([u,v,w+1])
if __name__=="__main__":
    main()