X,Y,Z,K = gets.split.map(&:to_i)
A,B,C = $<.map{|ln| ln.split.map(&:to_i).sort_by{|_|-_}+[0] }
ia = ib = ic = 1
a, b, c = A[ia-1], B[ia-1], C[ia-1]
until K <= ia*ib*ic
	a, ia = A[ia], ia+1 if b <= a && c <= a
	b, ib = B[ib], ib+1 if a <= b && c <= b
	c, ic = C[ic], ic+1 if a <= c && b <= c
end
p *A.take(ia).product(B.take(ib), C.take(ic)).map{|_|_.inject(:+)}.sort_by{|_|-_}.take(K)
